Why Not All Of The Patterns?

A number of readers have written to ask why I didn’t cover all of the GoF patterns. There really was a number of reasons. Mainly, there just wasn’t room in the book to cover all 23 patterns and also say all of the things about Ruby that I wanted to say.

I also wanted to try to use each pattern as the context for explaining some aspect of Ruby programming – so the chapter on the template method pattern talks about dynamic typing while the chapter on the proxy pattern explains the method_missing method. But not all of the GoF patterns are good vehicles for this kind of discussion.

Finally, some of the GoF patterns – and here the visitor pattern comes to mind – just don’t make a lot of sense in Ruby.

The missing patterns are: