logoalt Hacker News

DarkNova6today at 10:04 AM0 repliesview on HN

Java has the mantra of "Integrity by default" which means you can tear into non-integral value type with a flag.

This is the strength of Valhalla. Instead of a binary object/value choice you have different levels of semantic guarantees that will give you better performance characteristics, depending on what your type will be able to give up.

You can have tearability for a complex/quaternion number without problem. But if you have something such as a Range-type class, that gets more problematic because cross-field constraints can be violated.