[Tutor] Another new book

alan.gauld@bt.com alan.gauld@bt.com
Thu, 14 Feb 2002 14:51:21 -0000


> i had a question here though..are all patterns suggested (say 
> in GOF) for a statically typed language like java applicable 
> to a dynamically typed language like python?

Two comments:
1) The GoF book is not about Java, it's primarily written about 
Smalltalk which is dynamically typed like Python. Almost all 
the GoF used Smalltalk at the time they wrote the original 
patterns book - one of the reasons all the patterns are single 
inheritance based.

2) Not all patterns for statically typed languages are applicable 
to dynamically typed languages and, more significantly, vice versa!
Dynamic patterns that don't work for statically typed are far more 
common than the other way around IMHO... (Statically typed languages 
rely on inheritance for polymorphism which seriously restricts 
the opportunities available.)

Alan g.