3 ms·
That's awesome, thanks for the tip!
by pdmccormick 13y ago
That's awesome, thanks for the tip!
- dragontamer 13y agoIf you find this tip useful, you probably need to read the Gang of Four's Design Pattern book. Not every design pattern has been useful (omfg, decorators, visitor, and double-dispatch are messy as all hell. Singleton IMO is an anti-pattern, no better than a global variable... etc. etc.). But a lot of the simpler patterns, like static factory methods, are very useful in day-to-day programming.
- munificent 13y agoI use the visitor pattern in interpreters, parsers, and compilers all the time. Outside of the language domain, though, I've almost never reached for it. Decorator is a cool idea, but I haven't found much use for it in practice.