Loosening requirements for super() invocation

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Jan 26 22:05:11 UTC 2023


On 26/01/2023 21:37, Maurizio Cimadamore wrote:
>
> For instance, even if we only allow updates to local fields, an 
> instance initializer can now see these updates. for you, this is 
> something good, for me this is just something else that developers 
> would have to remember about initialization order.
>
Also, thinking some more, I realized that one of the things I find more 
"offputting", is that putting initialization of instance fields before 
`super` violates the mental barrier I have (and that I'm sure other 
developers have too) that the letters `t h i s` should never appear 
before a super() invocation. And I know it's an assignment, and it 
special, and the VM can deal with it... but... still... language-wise I 
think if we can latch onto rules that are fairly simple to explain ("no 
`this` -explicit or implicit - before this point!!!!), it makes things 
easier.

Maurizio



More information about the amber-dev mailing list