From: Christopher Anderson Date: 2007-12-02T09:26:35+09:00 Subject: Re: Why are "Array#push" and "pop" not "push!" and "pop!"? so the next question is do you think those could be useful additions? or, can the push/pop/shift/unshift in that case (as opposed to the equivalent! term) be gotten in some other way that makes the current way (no ! methods at all) most advantageous/efficient, since both ends can currently be achieved. On Dec 1, 2007 3:52 PM, John Joyce wrote: > To put it another way, consistency for consistency's sake alone is > not the goal. > Consistency helps make things somehow predictable, but sometimes it's > just bloat. > > That said, if Ruby had immutable classes, it would be important to have > push # return a new Array object with the result of a push > push! # alter the Array object in place with the result of push > pop # return a new Array object with the result of a pop > pop! # alter the Array object in place with the result of pop > >