From: Nikolai Weibull Date: 2005-06-02T09:49:05+09:00 Subject: Re: Method Chaining Issues ES wrote: > > > class Foo > > > def initialize > > > @a = 5 > > > end > > > > > > attr_accessor :a > > > end > > > > > > foo = Foo.new > > > foo.a = 6 > > > > > > Current behaviour aside, should the last line create a new Foo object? > > > > Very funny. Totally different argument, > > This is the counterargument for keeping destructive methods. 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, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}