Possible records tweak

Brian Goetz brian.goetz at oracle.com
Fri Apr 24 19:40:55 UTC 2020

> I wouldn't suggest a syntactic restriction on 'this'—that's a brittle way to try to provide guarantees about not leaking the object being instantiated. (What about the entities in scope? What about 'super'? What about inner class instantiations? It's whack-a-mole.)
What if we said that `this` were DU in the entire body of the compact 
ctor, just as it is before the this/super call?  This would obviate the 
need to create yet another model (like static, but not quite), and 
instead would keep you from depending on `this`.

More information about the amber-spec-experts mailing list