hg: lambda/lambda/langtools: Implemented features are:
Alex Buckley
alex.buckley at oracle.com
Fri Jul 30 11:56:26 PDT 2010
"catch (Foo x)" names a disjunctive type - albeit not a very interesting
one - and it would not be backward compatible to ban assignment to x.
This is, of course, a discussion for the Coin list.
Alex
On 7/30/2010 11:53 AM, Osvaldo Doederlein wrote:
> One possible approach is: make disjunctive types not only eligible for
> effectively-final analysis, but _obligatory_ final. Any attempt to
> reassign results in error, and that's it. You're doing that on new
> syntax and typing features, so there's no legacy or backwards-compat
> issues. The user could still put an explicit 'final', that would be
> redundant. Not perfect, but there is plenty precedent in Java for this
> kind of redundancy and for qualifiers that are needed in some contexts
> but default/obligatory (e.g. 'public' for interface members, or
> 'final' itself for private methods).
>
> A+
> Osvaldo
More information about the lambda-dev
mailing list