Loosening requirements for super() invocation

Brian Goetz brian.goetz at oracle.com
Thu Nov 3 13:07:15 UTC 2022



> This new "this escape" warning would really just be a new compiler 
> feature rather than a language change, right? It's not changing the 
> language, it's just expanding the set of possible warnings that can be 
> generated. Obviously it would be very helpful in getting people to 
> think more about "constructor hygiene".

Warnings generally do not require a spec change (though few some are 
specified as "mandatory warnings".)  Obviously changing what statements 
are allowed where does requires spec change.

> So then would its inclusion in a JEP be more about precisely defining 
> the concept and describing the goodness that comes from it?

While we could do more warnings as ordinary RFEs, there's potentially 
still value in grouping these all under a JEP, for the reasons you hint 
at and more.  Let's work through the design, figure out if we can 
actually provide any new safety guarantees (as opposed to just more 
warnings), and then figure out the best vehicle.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20221103/79ab3eda/attachment.htm>


More information about the amber-dev mailing list