On 27.12.2007 18:53, MonkeeSage wrote:
> On Dec 27, 9:55 am, Sebastian Hungerecker <sep... / googlemail.com>
> wrote:
>> George wrote:
>>> What would you expect this to do?
>>>   [].last = 1
>> The same thing as "[][-1] = 1", I'd imagine.
>> The problem I'm seeing would be this: If you allow arr.last = x, you'd also
>> have to allow arr.last(n) = x if you want to be consistent, but that's not
>> syntactically possible.

I do not see why allowing last= would make lasts(n)= necessary. 
Array#last and Array#first index exactly one argument - no need for 
additional indexing.

> Agree. It's tempting to treat #first / #last as 0 / -1, but in
> actuality they are method calls and simply return a value; they don't
> subscript an array.

Array#[] and Array#[]= are method calls as well.

 > Setting #last is not semantically different than
> [1,2,3].pop = 4, it's just that #last is just a bit more subtle.

#last is non destructive while #pop is destructive.  Not the same.

Regards

	robert