Re:Show HN: UML model and code examples of GoF patterns in C...
by mhh__ on Sunday April 11, 2021 @08:24AM
(#26769842)
The only pattern I regularly use is the Visitor pattern, which is very common in compilers these days. It's productive, but I'm still slightly worried when I use it because it seems to encourage relatively stateful code that doesn't compose properly. Writing a new visitor takes a while, so people also put too much in one visitor.
[ Parent
| on HN ]
Re:Show HN: UML model and code examples of GoF patterns in C...
by specialist on Sunday April 11, 2021 @11:16AM
(#26770864)
Tangent: Over time I migrated to favoring Iterator over Visitor. Similarly, using event model with Command objects instead of Observable. YMMV, of course. Both require seeing problems thru a different prism.