38 ms·
Design Patterns has itself turned out not to be anywhere near as important as it seemed at the time. The only one I ever hear of nowadays is the "visitor patte
by ncmncm 4y ago
Design Patterns has itself turned out not to be anywhere near as important as it seemed at the time.
The only one I ever hear of nowadays is the "visitor pattern".
Anti-patterns have more sticking power. Arguably all patterns are anti-patterns, since each identifies something one's language is too weak to capture in a library. As C++ got more powerful, the patterns vanished into ordinary library components.
- belter 4y ago“Design patterns are bug reports against your programming language” -- Peter Norvig https://news.ycombinator.com/item?id=8735187 https://news.ycombinator.com/item?id=8735187
- mickeyp 4y ago- Decorator pattern, as seen in Python's @decorators; - Factory functions, as seen everywhere, even if people don't bother thinking of them as such; - Memento pattern, a common way of implementing undo-able actions in applications that need it; - Proxy pattern, frequently used when you have a code-generated client that talks to a server from a template. Like generating REST/RPC client code that matches a server spec; - Visitor pattern, but you already mentioned that... but ironically enough, if you have pattern matching support in your language, it's much easier to use that. And that's just off the top of my head. If you use any of these you're no architecture astronaut, nor are you gilding your lillies.