[Miles's message didn't appear to get through]
Thanks Miles. A couple points:
- I gather from this that you would find "functional" (non-modifying) style to be surprising. This is interesting because it's not what I would intuitively expect would be the hope of most coders.
- Deprecation is always an option. If I went with option (A), I'd probably consider deprecating certain methods in MutableDouble2D. But I've always tried to be very slow and conservative on MASON so as to avoid having to deprecate much.
- You mentioned polymorphism, so I thought I'd mention that interestingly Double2D and MutableDouble2D do not derive from one another; and likewise similar other pairs in MASON (Int2D, Double3D, Int3D) The reason for this is straightforward: in both cases I want users to be able to access the instance variables directly rather than be required to use methods like getX() and setX(), which would *not* be inlinable (indeed, non-inlinability s a major problem for the java.awt.Point family as a result). The problem is that Double2D needs to have those variables final, while MutableDouble2D can't have them final. There's no way in Java to derive a class and change the finality of certain instance variables. It's plausible to make them subclasses of the same interface I suppose.