On Tuesday 26 November 2002 07:25 pm, Richard A. O'Keefe wrote:
I've just been reading the book "Pattern Hatching: Design Patterns Applied" by John Vlissides, Addison-Wesley 1998, ISBN 0-201-43293-5.
I have come away from this with two overwhelming impressions:
(1) Here is a better than competent OO programmer, and C++ is fighting him every inch of the way.
Luckily (?), he's now working mostly on Eclipse plugins (at least that's what he told me on the monorail at OOPSLA).
Example after example is basically "how do I design-hack a way around such-and-such a limitation of C++."
Yes, but the original Design Patterns book was like that too. There are patterns in there that are trivial or unnecessary in Smalltalk.
I've always been fairly positive about patterns, and I've
taught them to students. This book, by one of the GoF, made me wonder. The examples strike me as Heath Robinson-ish; is this because of pattern-think, or is it because of C++?
(Note to some US readers: Heath Robinson did drawings similar to Rube Goldberg)
Don't you think that (for instance) the C++ template system and especially its (excessively?) clever use by the STL rates as a more than a bit Heath Robinson-ish?
It would be really illuminating to see some of his examples revisited by a better than competent Smalltalker, because I think you'd end up with a completely different set of patterns being applied, or the patterns would look different.
Or some wouldn't be there, as you note:
POOF! An entire pattern disappears up its own fundament if
your environment can represent code as data and can run dynamically generated code.
Is this something that would be interesting/useful for your students?
"See how patterns only make sense in their original (often unstated) context: watch how I make this one go away by a different language choice..."