how can I make an implementation of some thing like Foo:
>> assert(Foo("+", 1, 2) == 1+2);
>> assert(Foo("*", 3, 2) == 3*2);
without writing a long switch with case for each operator like:
>> switch (oper) {
>>   case "+": return a+b;
>>   ..
>> }
I know how to implementation a compile-time equivalent with the mixin statement.
thanks.

Reply via email to