Re: Re: New Proposal: Number.range (Yes, range again)

2019-05-12 Thread Ed Saleh
Fully Support ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: New Proposal: Number.range (Yes, range again)

2019-02-12 Thread Cyril Auburtin
I'm really cheering for the slice-notation range extension proposed in https://github.com/tc39/proposal-slice-notation/issues/19#issuecomment-421453934 ```js for (const i of Number.range(0, 43)) { console.log(i) // 0 to 42 } const fakeData = [...Number.range(1, 21)].map(x => x ** 2) ```

Re: New Proposal: Number.range (Yes, range again)

2019-01-18 Thread Jack Works
Hello everyone, I made a formal proposal https://github.com/Jack-Works/proposal-Number.range , welcome to disscuss the details in the repo! On Thu, Nov 29, 2018 at 3:01 PM Jordan Harband wrote: > It's not a "standard library" unless every part of it has gone through a > full standards process.

Re: New Proposal: Number.range (Yes, range again)

2018-11-30 Thread Cyril Auburtin
cf https://github.com/tc39/proposal-slice-notation/issues/19 which would be more powerful as a literal On Thu, Nov 29, 2018 at 8:01 AM Jordan Harband wrote: > It's not a "standard library" unless every part of it has gone through a > full standards process. > > On Wed, Nov 28, 2018 at 8:31 PM

Re: New Proposal: Number.range (Yes, range again)

2018-11-28 Thread Jordan Harband
It's not a "standard library" unless every part of it has gone through a full standards process. On Wed, Nov 28, 2018 at 8:31 PM Jacob Pratt wrote: > I'm not saying we should add it on to that proposal, but rather saying > that I think more effort should be put into a standard library where

Re: New Proposal: Number.range (Yes, range again)

2018-11-28 Thread Jacob Pratt
I'm not saying we should add it on to that proposal, but rather saying that I think more effort should be put into a standard library where things like this don't need to go through a full standards process. That's just my opinion, and borderline on-topic for this specific suggestion. I'm

Re: New Proposal: Number.range (Yes, range again)

2018-11-28 Thread Jack Works
Oh, I'm not here to find out how to implement a range in detail. That's the trivial things, I want to first make it become a stage 0 proposal, then we can discuss if we need some overload or how to deal with the edge cases. Ps, does Pratt mean we should add it as a standard library in the stage 1

Re: New Proposal: Number.range (Yes, range again)

2018-11-28 Thread Jacob Pratt
Quick, simple TypeScript range function (with overloads, of course). ``` export function range(end: number): IterableIterator; export function range(start: number, end: number): IterableIterator; export function range(start: number, end: number, step: number): IterableIterator; export function*

Re: New Proposal: Number.range (Yes, range again)

2018-11-28 Thread Tab Atkins Jr.
I end up writing a range function in virtually every project I use, so yeah, I think this is worthwhile. My own preferences, based on Python precedence: Number.range(end) === Number.range(0, end, 1) Number.range(start, end) === Number.range(start, end, Math.sign(end-start)) Number.range(start,

New Proposal: Number.range (Yes, range again)

2018-11-28 Thread Jack Works
Hello everyone. I've searched for the mailing list, there are some discussions add `new Range` or `a ... b` into the language but not become a formal proposal. I've made a full demo(polyfill) these days. Anyone interested? Preview: `for (let i of Number.range(1, 5)) console.log(i)` And there is