Re: Add an easier method for slicing and stepping strings and arrays

2017-07-26 Thread Isiah Meadows
To clarify, I'm just a normal, non-committee person. So that's a "I like the idea and it looks workable", but not "I'll champion this for you" (when I can't). On Wed, Jul 26, 2017, 21:41 Isiah Meadows wrote: > That, I could support. > > On Wed, Jul 26, 2017, 16:38 Alexander Craggs > wrote: > >>

Re: Add an easier method for slicing and stepping strings and arrays

2017-07-26 Thread Isiah Meadows
That, I could support. On Wed, Jul 26, 2017, 16:38 Alexander Craggs wrote: > In which case, perhaps change this proposal to .slice(start, end, step) > ___ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discus

Re: Add an easier method for slicing and stepping strings and arrays

2017-07-26 Thread Alexander Craggs
In which case,  perhaps change this proposal to .slice(start, end, step)___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Re: Add an easier method for slicing and stepping strings and arrays

2017-07-24 Thread Jordan Harband
Array slice already allows negative indexes. `arr.slice(-1)[0]` works fine for a quick and dirty "last item". On Mon, Jul 24, 2017 at 3:19 PM, Tab Atkins Jr. wrote: > On Sun, Jul 23, 2017 at 12:36 AM, Darien Valentine > wrote: > > Here are some related threads from the past: > > > > https://esd

Re: Re: Add an easier method for slicing and stepping strings and arrays

2017-07-24 Thread Tab Atkins Jr.
On Sun, Jul 23, 2017 at 12:36 AM, Darien Valentine wrote: > Here are some related threads from the past: > > https://esdiscuss.org/topic/negative-indices-for-arrays > https://esdiscuss.org/topic/array-slice-syntax > https://esdiscuss.org/topic/javascript-language-feature-idea > > I think I’ve seen

Re: Re: Add an easier method for slicing and stepping strings and arrays

2017-07-23 Thread Dante Federici
This feels like an attempt to get toward python's style of slice . Which I'm not opposed to, and would like to hear how it's better than just the method. ___ es-discuss mailing list es-dis

Re: Re: Add an easier method for slicing and stepping strings and arrays

2017-07-23 Thread Darien Valentine
Here are some related threads from the past: https://esdiscuss.org/topic/negative-indices-for-arrays https://esdiscuss.org/topic/array-slice-syntax https://esdiscuss.org/topic/javascript-language-feature-idea I think I’ve seen it mentioned a few other times too. The `arr[-1]` syntax is a non-sta