Hi --

On Thu, 16 Mar 2006, Robert Klemme wrote:

> Ah, don't bother.  The API of the standard lib has it's humps and bumps (for 
> example not fully consistent usage of ! for destructive methods etc.) so it's 
> normal to fall into one or the other pit initially.

I have to leap to the defense of ! :-)  It really is consistent:

   * given meth and meth!, meth! is the more "dangerous" version
   * "dangerous" often means "receiver-changing", but definitely
       does not have to mean that
   * methods whose names already imply receiver-changing don't
       have a ! because they don't need one, and also ! methods
       only come in pairs with a non-! equivalent.  (It would be
       hard to imagine what "Replace the contents of this string
       object, but without changing the object" would mean....)

"Implying receiver-changing" is of course in the eyes of Matz :-)  But
while there are judgements, I don't think there's any inconsistency.


David

-- 
David A. Black (dblack / wobblini.net)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" chapters now available
from Manning Early Access Program! http://www.manning.com/books/black