Isn't it what famous 'invokedynamic' targets for? Could anybody please direct me to any development done in this direction?
On Dec 7, 2007 11:11 AM, Charles Oliver Nutter <[EMAIL PROTECTED]> wrote: > > Jochen Theodorou wrote: > ... > > 1) build a list of all methods with the name of the method we want to calls > > 2) remove the methods that are not valid for the call > > 3) if more than one method remains calculate the "method distance" > > between the call and the method > > 4) the method with my minimum distance will be selected > > 5) if at the end I have two or more methods with the same minimum > > distance I have to report an error > ... > > So.. how do other languages do that? > > I'm not going to try to describe the JRuby way, because it's not nearly > as good as we'd like it. What I would like to do is say we need "one > way" we can use to do this method selection and dispatch in all our > languages. > > Attila mentioned that he had been working on a library to do dynamic > dispatch on Java types according to the specified behavior that javac > follows for static dispatch, and I presume he meant the MOP library > that's now available in release form. If that's the case, it would be an > additional, very compelling reason for us to try to back that library by > implementing the interfaces in our language impls. I've already done a > first pass in JRuby, and it's not a hard process; if both Groovy and > JRuby implemnted the interfaces (or a version of then we could evolve > out of discussion) we might mutually gain the benefit of Attila's Java > types MOP for free, and have consistent dispatch behavior across both > languages. > > - Charlie > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to jvm-languages@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---