A syntax option (function types versus arrays)

Peter Levart peter.levart at marand.si
Tue Mar 2 04:29:08 PST 2010


On Tuesday 02 March 2010 12:41:02 Peter Levart wrote:
> Regarding preference to expression lambdas, I think they provide a way to avoid defining the meaning of "return" at present time. The 1st release of lambdas in JDK7 could simply disallow "return". Experience gathered from the milions of Java developers in comming years would help shape a decision of what to do with "return" (be it local or transparent) for the next release in JDK8 which could add statement lambdas as well.
> 
> I think that gradual additions to the language where 1st addition leaves open options for the future is a safe path. We may argue till the end what is going to work better but why not just wait and see what is going to be missed the most?

For example: What would have been if JDK1.5 disallowed arrays of parameterized types? Would have they been added to the language in JDK6? Would there be a strong demand to add them? Maybe just in varargs methods.

Regards, Peter


More information about the lambda-dev mailing list