Ron Fox wrote:
> I use arrays for other purposes... however the best answer is probably 
>  to think of Ruby, or any other programming language for that matter, as 
> a game with a fixed set of rules.  You have to play by those rules... or 
> play another game.
> 
> That leads to the answer that Ruby does this because the designer chose 
> to do it that way.  No other reason needed.
> 
> Ron

I found the quote:

"The rule for ruby is that all decisions are made to make it more fun to 
program in."

I'd have to agree, not dealing with array sizing makes it more fun to use Ruby. 
   If you're wondering why I keep pressing the subject, it's because I'm 
currently doing research for a new language.

Not to start a flame war, but the ability for Python to chain operators,
eg "-1 < i < 1", makes it "fun to use"... any thoughts?  One drawback is that 
it's only syntactic sugar and breaks down when you try "(-1 < i) < 1".

Mike

> Mike Austin wrote:
>> Charles Oliver Nutter wrote:
>>> Mike Austin wrote:
>>>> :) Just curious as to why Ruby automatically increases an array's 
>>>> size when items are added.  I could see where it would be 
>>>> convenient, but it also seems like bad practice.  One can, and 
>>>> should use a hash as a sparse array.
>>>
>>> Because it's an array, not a sparse array.
>>>
>>> - Charlie
>>>
>>
>> True enough :)  But what about in terms of practicality?  Does it make 
>> working with arrays that much simpler?  I use Ruby Arrays as stacks 
>> mostly, where you don't run into setting values outside the current 
>> range.
>>
>> ~ Mike