Charles Oliver Nutter a écrit :
> 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.
>
> - Charlie
>   
To avoid interface explosions, you can erase an object type as Neal 
Gafter has proposed:
i.e (String,String => int) is erased to (Object,Object => int)
and add casts at call site.

I've counted only 927 different erased signatures considering
all public methods of all public classes of rt.jar.

Rémi

Rémi

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to