On Thu, Oct 14, 2010 at 10:46 PM, Thomas Heller <thom.heller@googlemail.com> wrote:
So, one of your points of criticism was that my solution was overly verbose.
I like to throw this ball back at you. I think both solutions are quite
verbose. I guess verbosity is what it takes to get a solution meeting the
requirements.

You're right, my solution is verbose, too. The problem is the open-extensibility requirement. Proto::or_ is concise. The equivalent proto::switch_ is verbose. There aren't many constructs in C++ that are openly extensible. Namespaces, overload sets and template specializations. (Others?) Only template specializations fit the bill, and specializing a template takes a lot of typing. And if you want the set of transforms to be also openly extensible and independent of the grammars, that's twice the boilerplate. Seems unavoidable.

I'm interested in finding some nice wrapper that presents a cleaner interface. Maybe even macros could help.

Eric