Closed
Bug 1008783
Opened 12 years ago
Closed 8 years ago
Alignment with Array.build ES? proposal
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: rwaldron, Unassigned)
Details
This should be considered more of a long term "reminder" than an immediate action item.
Relevant: https://bugzilla.mozilla.org/show_bug.cgi?id=860965
Dave Herman and I have discussed the usefulness of list-build functionality and Dave suggested that we propose Array.build for ES7 (too late for ES6). As the Array.build proposal progresses for ES7 https://gist.github.com/rwaldron/11186883, there may need to be changes to the current implementation (or not).
The only difference I can see on first look:
> Array.build(10);
In The current implementation, this would throw. The proposal attempts to improve the feature by making absence of a proc argument default to an identity: `x => x`, eg:
> Array.build(10);
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
> Array.build(10, x => x);
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
It's also possible that this behaviour is not accepted, in which case no changes to Array.build in SpiderMonkey would be necessary. Again the point of this ticket is track and coordinate progress :)
Comment 1•12 years ago
|
||
This change would be so easy to implement I would gladly change it back and forth depending on the current state of the spec just to game my commit count.
Comment 2•8 years ago
|
||
New features to JavaScript should now be proposed to TC39 [1] before being implemented in SpiderMonkey, therefore closing as Invalid.
[1] https://github.com/tc39/proposals/blob/master/CONTRIBUTING.md
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•