About the Talk
February 21, 2009 12:00 PM
Ruby is the revenge of the Smalltalkers. Not since Smalltalk has a language had such powerful meta-programming facilities. While this may seem like a minor feature, it turns out that surgical meta-programming allows solutions to problems that are clearer, more concise, more maintainable, and take orders of magnitudes fewer lines of code.
This session shows one of the reasons that JRuby is the most powerful mainstream language today: meta-programming. It shows tons of meta-programming techniques in Ruby, including open classes, the shadow meta-class, defining methods, method_ & const_missing, dynamically adding and removing mixins, and more. And each of these comes with an example that actually makes sense!
* Modules * Structs * Freezing * Messages and Dynamic Invocation * The Shadow Meta-class * Code as Objects * Delegation * Open Classes * Aspects * Missing! o Const o Method * Reflection * Mixology