Method Pointers

Sam Pullara sam at sampullara.com
Sun Feb 26 15:43:11 PST 2012


Since we are going to support it when the interface is Serializable, why not just require that you do something like:

interface SerializableRunnable extends Runnable, Serializable {}

and then cast it to that at the call site. Is this an option that sucks?

Sam

On Feb 26, 2012, at 3:29 PM, Brian Goetz wrote:
> Another use-site opt-in would be explicit serialization support.  While 
> we plan to do at least as well as inner classes -- a lambda is 
> serializable if its target type is -- we'd like to do better, and 
> provide a way of opting in.  This largely turns out to be a syntactic 
> problem -- what is the syntactic form of the opt-in.  (Lots of 
> suggestions have been made, and so far they all suck.  I will open this 
> to suggestions at a future time, but until then, please hold your fire.)


More information about the lambda-dev mailing list