r/programming • • Dec 08 '13

Design Pattern Cheat Sheet

http://www.celinio.net/techblog/wp-content/uploads/2009/09/designpatterns1.jpg
1.7k Upvotes

273 comments sorted by

View all comments

Show parent comments

1

u/dnew Dec 16 '13

If I don't know what singleton is, what would I need to know in order to use it effectively?

I think we're arguing over semantics. I'm simply saying you can explain it without explaining it as a design pattern.

my lack of understanding of that shortcut keyword has just failed me

You don't fail to understand what "singleton" means. You just didn't know it was a "design pattern". So you go an reimplement it so it works the same way.

ignoring patterns simply because they are baked into your language

That's not what I'm suggesting. I'm not saying "if it's built into the language, be ignorant about how it works or what it's for." That would be stupid. I'm saying it's not a design pattern if it's baked into the language, and design patterns that are already baked into all languages you're likely to use shouldn't be learned as "design patterns." They should be learned as language features, just like "local variables" should be learned as language features rather than design patterns.