[Tutor] Another new book
Fri, 15 Feb 2002 11:48:39 +0530
> 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.
oh!, the one i own has C++ examples.
The other day i was just wondering, java has a
java.lang.Runnable interface just to wrap a run() method bcos functions/
methods are not
first class citizens.
Does command pattern make sense to Python?
wIn java, we normally have classes implementing a Command Interface and we
all those instances in a hashtable/equivalent and invoke the Command method.
I guess Python w'd just store the method objects or function objects in a
achieve the same effect.
Can someone discuss other patterns which do not make sense / can be easily
done using Python?