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

From: Aleksi Niemel<aleksi.niemela@...>
Date: 2000-07-06 11:43:51 UTC
List: ruby-talk #3866
> def sub!(pattern, substitution, no_change_gives=nil)
>     #...
> end

This might be good idea. However I'd like to have a field in String which
describes what to return when no_change_gives equals to nil (kind of dynamic
default value :). Then all the programs work as previously, but when new
code is written one could say:

  Array.no_change_default_value = "self"  # or whatever way to return self

Then code like array.uniq! would always return nil. The problem with this is
that it just wont work in mixed world where new code calls old code.

So I guess if there's going to be any consensus here, we will have it
changed to some major version (like 1.8).

	- Aleksi

In This Thread

Prev Next