

GoF patterns in ruby - matstc
http://www.scribd.com/doc/396559/gof-patterns-in-ruby

======
iamwil
Here's an oldie, but goodie from our favorite director of AI.

<http://norvig.com/design-patterns/>

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.

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.

------
thomasptacek
Three comments.

(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.

(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.

(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.

Wouldn't it be cool to see the "real" design patterns for Ruby?

