That's definitely a useful technique, but beware that these aren't methods: they don't go through method dispatch at all. You don't get polymorphism this way, unless you use a double-dispatch scheme.
In reply to Re^2: Calling a method by name without eval()
by chromatic
in thread Calling a method by name without eval()
by atemerev
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |