3 ms·
That example bothered me as well mostly because when the move function is placed outside of the class it is now performing a different action. The new function
by th 16y ago
That example bothered me as well mostly because when the move function is placed outside of the class it is now performing a different action. The new function no longer really moves a point so much as it adds two points (regardless of the point/vector issue).
I think many of the naming conventions commonly used in OOP for mutable objects are not as appropriate for their immutable counterparts.