Closed
Bug 825801
Opened 12 years ago
Closed 9 years ago
[meta] Replace use of for each...in statement in Firefox UI/app JS code with for..of
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
People
(Reporter: tetsuharu, Unassigned)
References
Details
ECMA-357(E4X) is deprecated. We should reduce to use of for each...in statement.
Reporter | ||
Updated•12 years ago
|
Reporter | ||
Updated•12 years ago
|
Summary: Remove use of for each...in statement from Firefox → [meta] Remove use of for each...in statement from Firefox
Comment 2•12 years ago
|
||
Before removing for..each entirely, please consider: "for..each" is very useful, makes the code a lot clearer. for each (var item in array) vs. for (var item of array) vs. for (var i = 0; i < array.length; i++) { var item = array[i]; } Unfortunately, for..of can't replace for..each. For example, when iterating over a plain object var obj = { foo: 1, bar: 2}: for each (var value in obj) vs. for (var [, value] of Iterator(obj)) for..of is nowhere near as clear to read (most important), nor convenient to type. My plea: Before removing for..each, make sure that there is a replacement that is just as (or more) capable, clear/lean and convenient. Code readability has uttermost importance for me.
Comment 3•12 years ago
|
||
Sorry, ignore last comment, I misunderstood. I thought this was about the engine.
Summary: [meta] Remove use of for each...in statement from Firefox → [meta] Replace use of for each...in statement in Firefox UI/app JS code with for..of
Comment 4•9 years ago
|
||
All blocking bugs are fixed and other use are also removed in other bugs that blocks bug 1083470.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•