Substitutability, was Re: Finding the spirit of L-World

Stephen Colebourne scolebourne at
Sat Feb 23 16:57:50 UTC 2019

On Sat, 23 Feb 2019 at 13:43, Brian Goetz <brian.goetz at> wrote:
> One piece
> of this might be finding a different name for "value type", so that
> "there are three kinds of values: refs, primitives, and values" didn't
> sound so silly.

That could work. (Avoiding the bikeshed)

PS. How bad would it really be to change NaN == NaN to be true?
Wouldn't any breakages be pretty minor?

> > More radically, I think a lot of the debate here is due to the syntax
> > pain, which would go away if an additional operator was added to Java:
> I think its optimistic to think the pain "goes away" with more syntax.
> It would just move, to angst over understanding the differences between
> the now-THREE kinds of equality operators; that doesn't feel like
> winning to me.

I don't agree that its a third kind. .= is just .equals() with null checks.

To be honest, .equals() is one of the verbosity reasons I see pushing
people to alternate JVM languages. And this is going to come up again
with any future operator overloading discussion. I'm pretty sure an
operator would be widely welcomed.


More information about the valhalla-dev mailing list