Laura Creighton <l...@openend.se>: > When Design Patterns were new, the 2 of the first books to come out > were 'Design Patterns'[1995] which was C++ focused, and the 'Design > Patterns Smalltalk Companion'[1998]. If you read the two of them, side > by side (as DPSTC asks you to) you will be struct by how little of the > C++ code is about 'here is the pattern I want to implement' and how > much is 'here is what to do to bash the C++ type system into > submission' -- to the point where a couple of DP are files, in the > Smalltalk version as 'for Smalltalk this is only a few lines of code, > not enough to really be a pattern (and I bet you do this all the time > without thinking that you were using a Design pattern, don't you?)'. > The Smalltalk versions are all so much sorter. And Smalltalk, like > Python is a strongly and dynamically typed langauge. > > Thus it is no wonder that the DP get used more than they need to in > the java world. No matter what you write you will have to write the > 'and then get it past the type checking' part, and grabbing a > well-tested one of those saves you from a lot of bugs, even if you > have to take and overly-heavy and complicated DP to go along with it.
Great post! A few years back I programmed in Java. I literally had to write (or generate) 2,000 lines of code to satisfy the structural requirements (interfaces, method stubs, javadocs, ...) before the code actually did anything. Marko -- https://mail.python.org/mailman/listinfo/python-list