From: "NAKAMURA, Hiroshi" Date: 2000-07-07T11:06:03+09:00 Subject: [ruby-talk:03888] Re: Array.uniq! returning nil Hi, bang-thread-folks, > From: Yukihiro Matsumoto > Sent: Thursday, July 06, 2000 7:55 PM > |> I can agree with the possibility of the combination of modify/copy, > |> modified-or-unmodified-string/modified-string-or-nil. But I don't > |> feel '?' is a good name sign for it. Matz, at first, I have to say that I have ever seen this kind of objection by you somewhere. I'm sorry. > Currently I feel no need for self-modifying, non-conditional > combination. Basicly one should use copying (non-bang) version of the > methods. When he/she really wants to enhance performance, then he/she > can use bang version at the risk of himself/herself. I think you can > pay the cost of making new local variable for the performance tuning, > which is impossible for Python's immutable strings. He/She really wants to enhance performance, and is ready for paying his/her risk. Besides this, he/she wants to do method-chaining, I think. p aString.gsub!( "foo", "bar" ).split( // ).uniq!.to_s BTW, I tend to avoid method-chaining style (because of hardly debugging.) So I will use 'gsub!?' or 'gsub!&' instead of 'gsub!' if spec. would changed. To say the truth, *I* am satisfied with current behaviour of 'foo' and 'foo!'. // NaHi