Method Pointers

Rémi Forax forax at
Sun Feb 26 15:53:55 PST 2012

On 02/27/2012 12:43 AM, Sam Pullara wrote:
> 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?

yes, because you also have to change the API, by example
Executor should have also a new submit()/execute() that takes a 

Serializable is a runtime flag, it's ortogonal to the type system.
If annotations were present in the jdk 1.1, Serializable would be an 

> Sam


More information about the lambda-dev mailing list