top | item 11743213

(no title)

incepted | 9 years ago

Interesting take but I disagree with one point:

> This style of designing abstractions is often quite foreign in programming in the large, and other schools of thought (see Gang of Four) actively encourage weaving cryptic metaphors and anthropomorphising code as a means to convey structure.

The GoF didn't try to anthropomorphize, all they wanted to do is put names on things. Sometimes, these names have some meaning (e.g. Factory pattern) and other times, they have none (e.g. the Flyweight pattern).

The important concept that the GoF book introduced was to name things. What word was used for these names matters little.

In other words, similar to what the author of this piece is trying to achieve (and he does so pretty convincingly).

discuss

order

cantankerous|9 years ago

GoF didn't try to anthropomorphize, but they ended up doing it anyway. The things they sought to name where simply tools for humans. It's the programmers equivalent of a book about hammers and screwdrivers. It's valuable for learning how to use tools to drive fasteners, but without the existence of such things the information becomes about as actionable as any other anthropological piece.

catnaroek|9 years ago

> other times, they have none (e.g. the Flyweight pattern).

They could've called it “handrolled hash consing”, which is exactly what it is.

comex|9 years ago

I don't think that's much better than Flyweight in terms of intrinsic meaning. A little better, since it breaks down into hash + consing, but having not heard of either before, I wasn't able to easily guess what it was despite knowing what hashes and cons cells are. Of course, like everything else in Lisp it predates GoF, so I suppose it would have been nice to reuse existing jargon... But maybe a better name would be "memoized construction".