Towards Minimal L World
maurizio.cimadamore at oracle.com
Mon May 21 10:44:04 UTC 2018
On 18/05/18 20:28, John Rose wrote:
> It sounds like you fear that migrating a VBC to a VT must require rewriting its
> constructor into a completely new notation, not yet invented. I am saying that's
> not required, as the VBC notation is perfectly reasonable.
More the opposite; what I fear is that, by using a syntax that is 99%
similar to constructors, developers would be lead into a false sense of
security which might result in sharp edges.
You speak about semantics; I believe that the fact that object
construction is based upon a mutability assumption that is totally
absent in values is an important semantic difference.
Final fields are, I believe, not a very good metaphore for things that
are possible only inside a constructors; when you speak about a final
fields, well, you still have a regular field and you could almost even
putfield on it - if it weren't for restrictions added on top.
With values, we're saying that putfield _doesn't exist_ - it's not
matter of allowing it in one place and not in others (which, IMHO, the
'this.x = y' suggests); we're replacing it with a whole new pattern that
is not based on mutation. So, the fact that syntaxt-wise we're stuck
with a description that is based on mutability seems like a red herring
More information about the valhalla-spec-experts