[#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:04252] Re: TABWTDI and Hash.new([])

From: Aleksi Niemel<aleksi.niemela@...>
Date: 2000-07-28 13:10:20 UTC
List: ruby-talk #4252
> I seems to me that we could actually do it Perl's way (but better ;-)
> with not too much each effort.

Me too :).

But I stopped thinking when I realized I haven't thought about the
consequences for consistency.

How about Arrays? Should they be automatically resized (enlarged) when one
says:

  a = Array.new(2, 42, CREATENEWBYDEFAULT) 
       #=> a = [42, 42]
  puts a[4]            
       #=> a = [42,42,42,42,42]

After this I didn't dare to continue farther. Maybe there are no cases after
this, dunno.

	- Aleksi

In This Thread

Prev Next