tc39-transfer / proposal-random-functions

Proposal to add a Random namespace and several additional convenience functions for using randomness.
https://tc39-transfer.github.io/proposal-random-functions/
MIT License
3 stars 1 forks source link

Drop the list methods? #3

Open tabatkins opened 5 months ago

tabatkins commented 5 months ago

All of the list methods can be done inline as Array.from({length: n}, ()=>Random.foo(a,b)). In general, the committee appears to favor just making "make an array of Xs" something that authors can write themselves, instead of adding built-ins for it.

This also means we need list variants of every random method, or else justify why some get one and others don't. For example, currently if you want a list of random selections from an array, you have to write code like my example above; we don't provide a way to ask for an array of N selections.

I think we should just drop the list variants.