Magnus Lycka: > Except when it isn't obvious. What constitutes mutation of an object? > C++ handles this with 'const', and lets the programmer cheat by using > transient member variables, since there are cases when you actually > want to mutate objects a little, but claim that you don't...
Ruby uses '!' not for mutation but to indicate surprising or destructive mutation. If it was placed on all mutators, code would be full of '!'s. '!' is less common on methods that modify the receiver than on methods that mutate other arguments. There was a recent thread on this in c.l.ruby "Array#insert", starting 8 posts down. Neil -- http://mail.python.org/mailman/listinfo/python-list