← Back to context

Comment by tadfisher

1 hour ago

Java has always had this juxtaposition in language design where they don't want you to think hard about value types (hence no unsigned types), but the types themselves are precisely defined down to the specific bit pattern representation in bytecode. This is essentially hardcoded into the JVM and its bytecode specification and is too hard to change for compatibility concerns.

Luckily we have Valhalla, which is an admission that Gosling was partially wrong, and programmers who want to have an unsigned nullable non-zero 64-bit integral value type can just make one, and not have to pay outsized memory costs to do so.

If we're done paying homage to Gosling, can we get operator overloading for our fancy value types please? I have no idea if this is on the radar for Valhalla.