(Via Bill de hÓra)
"It's the second generation that's going to be less enthused, that's going to stare in bafflement at these classes that mysteriously spawn methods, and trying to figure out what's going when there's an exception in dynamically generated code. You can monkeypatch code in Python pretty easily, but we look down on it enough that we call it "monkeypatching". In Ruby they call it "opening a class" and think it's a cool feature. I will assert: we are right, they are wrong."I know next to nothing about the specific problems the Ruby and Python folks are encountering with "monkeypatching". However this capability is nothing new for dynamic languages. And it is a frequent desire for me when I program in C-like languages. If you become frustrated using static "utility" methods, for example in Java, that work with "closed" classes (say, String or Object), then you have at least some desire for these "monkeypatches".
See the thing is this capability *is* a cool feature in many Lisp and most Smalltalk systems. Sorry, dear readers who hate my Smug Lisp Weeniness. But it is true. Not only is it "cool," moreover it is *pragmatic*.
The truly good implementations of dynamic languages recognize the advantages of these kinds of extensions, and they've supported them with good tools for decades. Learn from it, don't run from it.
People developing large systems in dynamic languages, and people providing dynamic languages being used to build large systems have to also realize this:
You are no longer working with a "scripting" language. You need to demand and provide really good tools. Examples can be found on the internets, read about the Smalltalk and Lisp environments from way back when. Someday you can become as smug as we are, or maybe as brilliant as the people who made them for us.