[#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:03844] Re: Array.uniq! returning nil

From: Hugh Sasse Staff Elec Eng <hgs@...>
Date: 2000-07-05 17:34:53 UTC
List: ruby-talk #3844
On Thu, 6 Jul 2000, Yukihiro Matsumoto wrote:

> In message "[ruby-talk:03825] Re: Array.uniq! returning nil"
>     on 00/07/05, "NAKAMURA, Hiroshi" <nahi@keynauts.com> writes:
	[...] 
> |Aleksi, how do you think 'String#gsub?'.  Seeing 'String#gsub?',
> |how do people think?
> 
> I don't vote for them, if they actually substitute strings.
> Predicates should not have any side effect.
> 
> 							matz.

I read this as suggesting test before substituting, but I'm not
sure if you would gain much over

    if astring.sub(this, that) != astring
        ....

	Hugh


In This Thread