4 ms·
- 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
by 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.