Notes on implementing concise calls to constructors with type parameters
Ulf Zibis
Ulf.Zibis at gmx.de
Thu May 14 16:46:41 PDT 2009
Am 15.05.2009 01:38, Alex Buckley schrieb:
> Ulf Zibis wrote:
>> Am 15.05.2009 00:51, Alex Buckley schrieb:
>>> Ulf, you ask why:
>>>
>>> Cell<String> cs = new Cell(1); //unchecked warning
>>> String s = cs.x; //CCE at runtime
>>>
>>> cannot be rejected at compile-time, presumably with an error rather
>>> than a warning on the assignment.
>>>
>>> The answer is migration compatibility:
>>
>> My guess is, that this problem could be managed by javac option
>> "-source 1.7", but I'm not sure if there are some reasons against this.
>
> You're effectively suggesting that migration compatibility be dropped
> in JDK7. A language change of this magnitude is far beyond the scope
> of Project Coin.
>
> Alex
>
>
Yes, you got it. This is exactly what I wanted to say.
This potentially would make constructs like
Cell<String> cs = new Cell<>(1)
_superfluous_.
My additional question was, if anybody has an idea, if that would break
some other things, I'm not aware of.
-Ulf
More information about the coin-dev
mailing list