Re: es-discuss Digest, Vol 135, Issue 48

2018-05-23 Thread Alexander Lichter
An optimization would be great because in comparison to the existing concat method, rest/spread is significantly slower at the moment (see https://jsperf.com/single-array-composition) On 23.05.2018 18:34, Ben Fletcher wrote: Does the `[...oldArr, ...elementsToPushArr]` pattern take care of tha

Re: Re: Proposal: Array.prototype.shuffle (Fisher-Yates)

2018-04-29 Thread Alexander Lichter
On 29.04.2018 18:34, Naveen Chawla wrote: I don't think there's such a thing as "real random" in digital algos, just "pseudo random". You are right. I meant 'unbiased' pseudo randomness here. Apart from card games, what's the use case? There are a lot of potential use cases. The best that come

Re: Re: Proposal: Array.prototype.shuffle (Fisher-Yates)

2018-04-29 Thread Alexander Lichter
Hey all! Though this proposal was created more than five years ago, it's still something that should be standardized. As the algorithm is known and an implementation wouldn't take ages, bringing in Array.prototype.shuffle is a low-hanging fruit. Furthermore, it helps to provide a "real" ran