Here's an oldie, but goodie from our favorite director of AI.<p><a href="http://norvig.com/design-patterns/" rel="nofollow">http://norvig.com/design-patterns/</a><p>It's a talk on design patterns in dynamic languages, how most of the GoF design patterns get simplified or just go away. I can't iterate through each pattern and tell you how, but as anecdotal evidence, this has been my experience as well. Closures and first class functions, as well as dynamic typing gives ways around certain patterns.<p>That's not to say Ruby doesn't have design patterns. The more I look at metaprogramming constructs, the more I see the same tricks that people use. It's just not yet been enumerated by the Next GoF.
Three comments.<p>(1) Reads like "case-in-point" for Norvig's argument that the GoF patterns are artifacts of less expressive languages. Most of these examples battle clearer, more effective idiomatic alternatives in Ruby. <p>(2) Yet another misinterpretation of what Chris Alexander meant by "A Pattern Language". The GoF book isn't a cookbook, it's a starting point. <p>(3) This document didn't benefit at all from being "typeset" in PDF; any Wordpress blog with syntax highlighting plugins would have presented it better.<p>Wouldn't it be cool to see the "real" design patterns for Ruby?