"Leandro Lucarella" <llu...@gmail.com> wrote in message news:20090417191634.ga15...@homero.springfield.home... > Steven Schveighoffer, el 17 de abril a las 11:27 me escribiste: >> >> Sure, but what is the reason to need dynamic methods? I'm just trying to >> understand the usefulness of it. > > RPC is an example that comes into mind > > There is plenty of magic you can do with dynamic methods. Just try > a dynamic language and see =) >
But is there any that can't be done with a dispatch function? Besides, as I see it, the opDotExp-style syntax for calling a dynamic method is more limited because unless you're using a scripting language, you can't do: auto foo = new Foo(); char[] func = /* Get from user input */; foo.func(); // Call function the user specified But you can do that with either a dispatch method or a reflection API that supports invokation.