Draft Spec for Second Preview of Flexible Constructor Bodies (JEP 482)
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Fri Jun 7 21:23:41 UTC 2024
On 02/06/2024 22:36, Stephan Herrmann wrote:
> Do you consider the proposed rules too complex to implement cleanly,
> or too complex to explain to users?
It's a decent rule and explanation of what the compiler does.
The more I play with code like this, the more I find examples where, on
a first look is not immediately clear which way the compiler should go
(it's kind of hard to mentally keep track of which classes have members
that can be accessed), or how they should be translated. It probably
doesn't help that the implementation seems to be all over the place in
this area.
So, my argument is mostly a pedagogical one, e.g. drawing a clear line
that is less prone to mis-interpretation and might make the code
slightly more readable and predictable.
Maurizio
More information about the amber-spec-experts
mailing list