[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:03825] Re: Array.uniq! returning nil

From: "NAKAMURA, Hiroshi" <nahi@...>
Date: 2000-07-05 11:17:52 UTC
List: ruby-talk #3825
Hi, Aleksi,

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/9096

> From: Aleksi Niemel
> Sent: Tuesday, July 04, 2000 10:23 PM

> These and your example was exactly what I was looking for! Thank you.

You are welcome.

> Now I've come up with another proposition. We could change the behaviour in
> next versions. (And of course provide a simple, yet most cases fixing
> upgrade script.)  We could define obj.method! to *always* return the
> possibly altered object.

Yes, we can change the behaviour in future versions.

> And, now the new trick, add Array.uniq!? which would work like current
> Array.uniq!. The actual semantic hint the developer should get when he sees
> obj.method!? is 'this method modifies the object and returns something
> (possibly boolean) describing if any action was taken'. 

Your proposition recalled me an old article in ruby-list...yes,
I found it.
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/9096
We Japanese users discussed this issue, but we could not come to
a conclusion.  I cannot find any objection now.  Matz, how do you
think this proposition?

Aleksi, how do you think 'String#gsub?'.  Seeing 'String#gsub?',
how do people think?

// NaHi

In This Thread