Greenspun's Tenth Rule strikes again.

Deep in a large ++ codebase, I just found some polymorphism using std::variant and visitor pattern. There are three visitors: main one returning a result, and a pre- and post-processing visitors returning nothing.

The latter two are basically :before and :after methods from in .

Only thing missing in this picture are :around methods, and the ability to compose the visitors...

· · Web · 0 · 4 · 9
Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!