Method Pointers
Rémi Forax
forax at univ-mlv.fr
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
SerializableRunnable.
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
annotation.
>
> Sam
Rémi
More information about the lambda-dev
mailing list