_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
the D language handles this by having the names '$' and 'length' be the
length of the array, within the scope of a [] subscript, so you can say
something like a[$-1]. '$' is already too widely used in js, but maybe
something like '_' would work. say, if there's no declaration of _ in
scope, then _ within [] is the length of the array.
- RE: Negative indices for arrays Allen Wirfs-Brock
- Re: Negative indices for arrays Dmitry A. Soshnikov
- Re: Negative indices for arrays Erik Corry
- Re: Negative indices for arrays Dmitry A. Soshnikov
- Re: Negative indices for arrays David Herman
- Re: Negative indices for arrays Brendan Eich
- Re: Negative indices for arrays Dmitry A. Soshnikov
- Re: Negative indices for arrays Brendan Eich
- Re: Negative indices for arrays Dmitry A. Soshnikov
- Re: Negative indices for arrays Dmitry A. Soshnikov
- Re: Negative indices for arrays felix
- Re: Negative indices for arrays Dmitry A. Soshnikov
- Re: Negative indices for arrays Brendan Eich
- Re: Negative indices for arrays Dmitry A. Soshnikov
- Re: Negative indices for arrays Ash Berlin
- Re: Negative indices for arrays Dmitry A. Soshnikov