Tab Atkins Jr. (2013-07-28T16:00:22.000Z)
On Sun, Jul 28, 2013 at 7:38 AM, Axel Rauschmayer <axel at rauschma.de> wrote:
> Wondering: If most data structures in ES6 use the methods get() and set(),
> couldn’t we add those to arrays and then simply allow negative indices?
>
> Then we’d be able to do the following:
>> let arr = [ 'a', 'b', 'c' ];
>> arr.get(-1)
> 'c'
>
>
> That’d be kind of like a negative version of Allen’s “Object Model
> Reformation” proposal:
> http://wiki.ecmascript.org/doku.php?id=strawman:object_model_reformation

I am totally down with this.  It also means we can turn Arrays into
Map-likes by filling out the rest of the methods.

~TJ
domenic at domenicdenicola.com (2014-05-14T17:02:46.774Z)
On Sun, Jul 28, 2013 at 7:38 AM, Axel Rauschmayer <axel at rauschma.de> wrote:
> Wondering: If most data structures in ES6 use the methods get() and set(),
> couldn’t we add those to arrays and then simply allow negative indices?

I am totally down with this.  It also means we can turn Arrays into
Map-likes by filling out the rest of the methods.