On 2012-09-02 17:29, Dmitry Olshansky wrote:

I wouldn't question utility but rather the implementation of the above.
One thing I'd love to see is thing like
handful!("struct", "class", "union")

that does pre-process contents at compile time to speed up search.
In other words it's possible to not only come close to  a series of a ==
"struct" || a == "class" || a == "union" but surpass it.

Sounds like an enhanced tuple?

At the very least handful!(a,b,c) can take expression tuple and make
x in handful!(a,b,c) lower to:
return x == a || x == b || x == c;

even for run-time variables a, b & c.



--
/Jacob Carlborg

Reply via email to