From: Mike Campbell Date: 2003-02-13T22:51:06+09:00 Subject: Re: Why does Array#compact! return the array, but uniq! return a count? > > Array's bang methods return nil if it does not modify the receiver, so > > that chaining is not encouraged. > > I'm not suggesting a change, but what is the rationale for this? > > IMHO, chaining is one of the most useful aspects of ruby -- multiple > lines of code can be folded into one. With chaining you're generally > not interested in the intermediate results (otherwise you'd store them > in a variable somewhere) and so in-place modification is more > efficient since you don't have to create lots of intermediate objects > that are then immediately discarded. I'm with Tom on this one. The whole thing seems like a Pythonista form of "Do it this way. There is no other way." social engineering.