On 5/1/08, Charles Oliver Nutter <[EMAIL PROTECTED]> wrote: > > John Rose wrote: > > Or (I don't know if it could be made to work, but it's worth thinking > > about) method handles could interoperate more tightly with closures, by > > having each individual method handle somehow take on the appropriate > > function interface type. > > > I think this could lead to some kind of "handle explosion" where we have > (too) many handles designed to take many differently-structured > interface types. Too parametric? Obviously JRuby and Groovy take a very > simple approach now, and require all closures be of a single type and > its subtypes. If that were the idea you're talking about, where there's > a single closure interface everyone could implement, it would probably > be valuable for language implementers to more tightly interop...but I > can't imagine it would be pretty from Java.
Yes Java closures are a looming interop problem. Groovy, Ng and JRuby would, I imagine, have no major problem handling Java closures. Going the other way would probably require wrapping in a Java closure. It will be nice when the Java closure definition is fixed. I have not followed it too closely. I suppose it would be too much to ask that a lava.lang.Closure would be an abstract base class or (better still) an interface. John Wilson --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
