From: Martin DeMello Date: 2005-06-02T14:35:22+09:00 Subject: Re: Method Chaining Issues Nikolai Weibull wrote: > > No it?s not. This is an argument for keeping Ruby non-functional. This > has nothing to do with String#sub vs. String#sub! or Array#sort vs. > Array#sort! for that matter. When discussing destructive methods with > bangs, we?re discussing the merit of having String#sub! around for > efficiency reasons. It?s not a discussion of whether to allow objects > to modify their internal state or not. I know you know this and I know > what you?re trying to say, but this doesn?t lead anywhere, Note that string.meth! is not an optimisation of string.meth, it's an optimisation of string.replace(string.sort). There's a difference when there are multiple references to the string. martin