News for hackers. Stuff that matters.
Re:How to avoid the assignment statement by loup-vaillant on Monday July 12, 2010 @04:15AM (#1507183)
> naming a function "move" and then having it return the sum of two vectors is bizarre and worse than the original implementation.

I kept the name for the sake of consistency. I agree that's a mistake. The problem is that a `Point` should be moved with a `Vector`, and not another point. But introducing a `Vector` class would have lengthen my tutorial. Maybe I should use two `floats` instead of a `Point`.

Re:How to avoid the assignment statement by th on Monday July 12, 2010 @11:12AM (#1508095)
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.