Hacker News new | past | comments | ask | show | jobs | submit login

They did, though, kind of.

The GUI-oriented 90's vibe, meaning zero examples that anybody would ever bother learning. The bizarre stuff nobody ever uses (Flyweight? Bridge?). Singleton -- 'nuff said.

You're left with what, maybe three usable patterns? Factory, which favors opaque, magical return-type polymorphism. Visitor, which is a solution in search of a problem, and also gets confused with trivial tree-walking operations. Interface, which rocks, and became part of Java, but really just shows how much inheritance sucks.

The resulting confusion is the proud sponsor of an AbstractStrategyFactoryBuilderDelegate near you.




> The GUI-oriented 90's vibe, meaning zero examples that anybody would ever bother learning.

It was written in the 90's. GUIs were what application developers did back then. Web apps didn't exist yet.

> The bizarre stuff nobody ever uses (Flyweight? Bridge?).

If you've used enums in Java or instanced rendering in a game, you're effectively using Flyweight.

> Singleton -- 'nuff said.

They caution really hard against overuse of Singleton in the book, but all of those C programmers being dragged into OOP didn't know where else to stuff all their global state so they went to town on it.

> Factory, which favors opaque, magical return-type polymorphism.

If your language doesn't have first-class classes, Factory is really handy. If it does have first-class classes, well that means you basically have the Factory pattern in your language. :)

> Visitor, which is a solution in search of a problem

The day you write a compiler in an OOP language is the day you realize how unbelievably, amazingly, incredibly useful Visitor is.


There's no good idea you can't turn into a bad idea if you just do it hard enough.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: