From: Rick DeNatale Date: 2007-10-03T00:55:57+09:00 Subject: Re: Confession: I never learned CS On 9/28/07, bpfurtado wrote: > On Sep 27, 7:29 pm, MenTaLguY wrote: > > On Fri, 28 Sep 2007 06:31:47 +0900, "Rick DeNatale" wrote: > > > Most of the GOF book deals with the issues raised by statically > > > typed oo languages, and aren't as portable as one might think. > > You couldn't be more wrong, being statically typed does not interfere > in the runtime messages exchange between your objects. I didn't say that. However, it does AFFECT how you design. But if you really look at GOF most of the patterns are tied up in technical aspects of declaring interfaces, something which is crucial in C++ or Java. Although you can adapt some of the GOF patterns to languages like Ruby or Smalltalk, they really do come primarily from the C++ school, albeit many of them adapted Smalltalk practices. One of the reasons that Smalltalk examples are rare in the book is because the Smalltalk implementations of the ideas being expressed really didn't fit the patterns as they are described. > Design Pattern or better saying Object Oriented Modeling is just about > how to better model the comunications of your objects in order to get > more *reusable* and *maintainable* code. > > Those OO techniques are highly valid for Java, C++, Ruby or Python > world. You get good code by working with the characteristics of your language and tools. Many of the techniques in the GOF book are far more applicable to Java and C++ than Ruby, Smalltalk or Python. At an abstract level, the GOF book's biggest contribution was in providing a common vocabulary for a certain set of patterns, and for those using C++ and/or Java it gives good implementation advice. However I maintain my position that those who look at it as a language independent implementation cookbook aren't using it well. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/