enhanced enums - back from the dead?
brian.goetz at oracle.com
Mon Dec 10 21:33:32 UTC 2018
Thanks for the data!
Can you clarify: is 1 out of 55Kfiles for the "all raw type refs"
option, or the "only for raw enum refs"? It looks like you are saying
On 12/10/2018 4:27 PM, Liam Miller-Cushon wrote:
> I did some corpus analysis for the following question from your doc:
> There is a question on how broadly we want to affect typing rules
> for raw types; one option is to alter the rules for all type
> references; another, more conservative option, would be to use the
> refined rules only for enum raw type references (on the basis that
> generic enums and raw types will be frequently used together). The
> latter path has the clear advantage of avoiding all kinds of
> source compatibility issues, but it is more inconsistent -
> refactoring a generic enum into a class might lead to surprises.
> I found roughly one breaking change per 55000 files.
> For context that's about four times as many as the fix that was
> discussed recently for JDK-8207224. Less quantitatively, in the corpus
> I looked at it is noticeable but wouldn't be very difficult to work
> around, especially because there's usually a trivial
> semantics-preserving fix of adding an explicit unchecked cast.
> (For the analysis I applied only the changes to Types from the
> enhanced-enums branch, and commented out all of the `isEnum` checks.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the amber-spec-experts