On Dec 1, 2007, at 6:26 PM, Christopher Anderson wrote: > 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 > <dangerwillrobinsondanger / gmail.com> 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 >> >> > Like I said, my top-posting pal, if Ruby had immutable classes... I suppose it's possible to implement immutable Array and MutableArray (we already have that one) but how practical is it really? I can understand wanting it to prevent objects getting stepped on even accidentally, Cocoa does that a lot.