A response to Design patterns are from hell^2!

While I can agree that design patterns are quite abused nowadays – mostly by clueless people doing cargo cult programming – I cannot leave “[…] design patterns are language dependent uncommented.

Starting with the very first two sentences of Wikipedias Design pattern (computer science) page “[…] a design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code.” should result in a question like: How can something like that be language dependent?

Continuing with the Wikipedia page for the Builder pattern reveals a text that explains the pattern in a programming language agnostic way, leaving language specific implementations to the examples section where they belong.

Allow me to close this with a Singletons must die.

2 Responses to “Design Patterns are not from Hell”

  1. christerericson Says:

    It must have escaped you that the full title of the original Design Patterns book is “Design Patterns: Elements of Reusable Object-Oriented Software.”

    “Object-oriented” means “language dependent.”

  2. trav Says:

    Yeah, I noticed the same line. I didn’t want to pick it out as it’s not really integral to his main point.

    Another thing I noticed was that he said algorithms and data structures are NOT language dependent…
    I think lacking language features would impact the implementation of a specific algorithm/data structure a lot more heavily than implementing a design pattern, although I don’t have any examples off the top of my head, so maybe that assumption is incorrect…

    Good thing we have you clever bloggers to think about these things for us


Leave a Reply