>> A pattern of the form
>> 
>>   [a0, a1, 〰〰, ak, ...r, bn, bn-1, 〰〰, b0]
> 
> We currently haven't specified this syntactic form.  I'm not sure if it adds 
> enough value to justify the added conceptual complexity.



Using this pattern for accessing elements at the end would be useful. For 
example:

[...r, b0, b1, b2] = arr
     means: assign the three last elements of arr to b0, b1, b2 (and assign 
everything until these elements to r)

It would be nice if r was optional:
[..., b0, b1, b2] = arr

-- 
Dr. Axel Rauschmayer
a...@rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com



_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to