Tobias Schwinger wrote:
Stjepan Rajko wrote:
* What is your evaluation of the design?
I very much like the simplicity.
I'm not sure it really suits the name 'switch_', as I'd expect something syntactically different (something like Joel sketched out in his review, and with some argument forwarding), however, I think it's an important building block that should be kept as simple as possible.
I can assure you that my suggestion is "as simple as possible, but not simpler" ;-) Simpler than that is simply not usable to me. I know. I've been there many times. I have real world use cases for this thing. Switch is not simple. Let's not pretend it is. Here's an acid test for the API -- try to implement my suggested syntax on top of the "simple" API. You'll soon realize that you can't --without having to write the same amount of PP expansions all over again. It's not a suitable building block, like say, mpl::for_each. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net