Nick Sabalausky, el 17 de abril a las 16:48 me escribiste: > "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?
You can write anything even with brainfuck. There are no discussion about what's possible and what's not, we are just talking about syntax. I hope the "it can be done" argument stop poping out because we all agree that it's possible to do everything right now. The question is *how* you can do it. > 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 So? > But you can do that with either a dispatch method or a reflection API that > supports invokation. I think the reflection API is needed too, but that's another topic. Both would be great. -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- Cada movimiento que no se hace, es un movimiento que se pierde. Y cada movimiento que se pierde, se transforma en una mochila. Y las mochilas nos alejan, de nuestros amigos y nuestras amigas. Y nuestros amigos se transforman, en enemigos y en enemigas. Cada movimiento que se hace, es una mochila que se deja.