This concerns me:
Point newLoc = oldLoc with {
x *= 2;
y *= 2;
z *= 2;
};
It feels more like a mutable "Builder" class than a copy constructor. I guess the benefit is that you can do things like the above, instead of the following in Kotlin: val newLoc = oldLoc.copy(
x = oldLoc.x * 2,
y = oldLoc.y * 2,
z = oldLoc.z * 2
)
But in Kotlin it's more clear that oldLoc is immutable.