proposal-array-nth-last: array[^n] syntax

Cyril Auburtin cyril.auburtin at gmail.com
Thu Dec 12 17:31:27 UTC 2019


Thanks Isiah,

Yes I suggested it in
https://github.com/keithamus/proposal-array-last/issues/28 but I think it's
going in a different direction

Array.prototype.at is probably not in the spirit of String.prototype.at
proposal https://github.com/mathiasbynens/String.prototype.at/issues/2

I think I should rename my proposal to something like protocol-index or
symbol.index

On Thu, Dec 12, 2019 at 3:58 AM Isiah Meadows <contact at isiahmeadows.com>
wrote:

> Have you considered generic `array.at(n)` where `n` is either a
> positive offset from `0` or a negative offset from `array.length`?
> This is also related to Mathias Bynens' `String.prototype.at`
> proposal: https://github.com/mathiasbynens/String.prototype.at
>
> Also, you might have better luck sugggesting this in the stage 1
> proposal's repo: https://github.com/keithamus/proposal-array-last/
>
>
> -----
>
> Isiah Meadows
> contact at isiahmeadows.com
> www.isiahmeadows.com
>
> -----
>
> Isiah Meadows
> contact at isiahmeadows.com
> www.isiahmeadows.com
>
>
> On Sat, Dec 7, 2019 at 2:30 PM Cyril Auburtin <cyril.auburtin at gmail.com>
> wrote:
> >
> > https://github.com/caub/proposal-array-nth-last
> >
> > This is mostly in reaction of
> https://github.com/keithamus/proposal-array-last. The initial idea is
> great, but the approach in that proposal is quite limited, cumbersome
> >
> > I'm happy if someone can help writing some ES spec for it
> > _______________________________________________
> > es-discuss mailing list
> > es-discuss at mozilla.org
> > https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20191212/87c705f0/attachment.html>


More information about the es-discuss mailing list