You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to discuss and eventually propose the introduction of an Array.prototype.shuffle method. I think this is a method used in several context and helpful in many cases including but not limited to games.
Before creating a repository with a more formal proposition, I'd like to discuss the idea with the group and gather some feedback.
There's some useful info on esdiscuss. I'd also expect discussion about the randomness of the shuffle - would it be tied to Math.random, whose entropy is pretty underspecified?
Since the discussion was abandoned, I'd like to revamp it. I agree with the author of the post in saying that the algorithm should use the Fisher-Yates algorithm as PHP (and probably other languages do).
@AurelioDeRosa I haven't said much but I'm planning to talk to the other TC39 representatives in the next meeting to get more insights about it, as they might have more background for these features from other discussions. Just like @ljharb mentioned esdiscuss already serves as a starting point, but it's not one of the best tools for discovery.
Activity
ljharb commentedon May 22, 2016
There's some useful info on esdiscuss. I'd also expect discussion about the randomness of the shuffle - would it be tied to Math.random, whose entropy is pretty underspecified?
AurelioDeRosa commentedon May 22, 2016
Since the discussion was abandoned, I'd like to revamp it. I agree with the author of the post in saying that the algorithm should use the Fisher-Yates algorithm as PHP (and probably other languages do).
leobalter commentedon Jul 18, 2016
@AurelioDeRosa I haven't said much but I'm planning to talk to the other TC39 representatives in the next meeting to get more insights about it, as they might have more background for these features from other discussions. Just like @ljharb mentioned esdiscuss already serves as a starting point, but it's not one of the best tools for discovery.
leobalter commentedon Sep 6, 2016
I've talked about this in the last meeting and it's pretty clear the group does not want to extend
ArrayandObjectunless it's really necessary.Being able to implement it in a helper method (through some sort of shim code) lowers the needed value for it.
I understand it's frustrating to block this, but it will be hard to move this forward in the consensus process.