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.
- How to call binary functions on primitive on runtime? Tom
- Re: How to call binary functions on primitive on run... Jonathan M Davis