[Python-Dev] PEP 3144: IP Address Manipulation Library for the Python Standard Library

Nick Coghlan ncoghlan at gmail.com
Thu Aug 27 11:08:39 CEST 2009


Ben Finney wrote:
> Antoine Pitrou <solipsis at pitrou.net> writes:
> 
>> DrKJam <drkjam <at> gmail.com> writes:
>>> netaddr employs a simple variant of the GoF Strategy design pattern (with
>> added Python sensibility).
>>
>> It would be nice if you could avoid employing this kind of acronyms
>> without explaining them. Not everybody drinks the design pattern
>> kool-aid.
> 
> A pity, since the entire point of Design Patterns is to give us a
> vocabulary of terms to use that enable these concepts to be communicated
> *without* continually re-defining them. To that extent, then, they fail
> their purpose.

My experience with them the named design patterns is that:

1. An awful lot of them seem to be just about working around some of the
limitations of static typing, a lack of functions as first class
objects, or are in some other way a lot less useful outside a C++/Java
environment.

2. Others are used intuitively by a lot of developers that have never
even heard of any of the GoF authors or the Design Patterns book (the
Adapter pattern being the most common example that occurs to me).

I still think most people (even those that primarily work in dynamic
languages) can learn something by reading it, but following their
examples too slavishly creates evils of its own (especially when
attempting to apply patterns that don't really suit the language being
used). When the inappropriate use of named patterns runs counter to the
accepted idioms of a language is when I see terms like the "design
pattern kool-aid" mentioned above getting thrown around :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list