Closed Bug 1109166 Opened 10 years ago Closed 10 years ago

Coherent docs for JS generators and iterators (ES6 and legacy)

Categories

(Developer Documentation Graveyard :: JavaScript, defect, P5)

All
Other
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fs, Unassigned)

Details

:: Developer Documentation Request Request Type: New Documentation Gecko Version: unspecified Technical Contact: :: Details Reference articles for new ES6 generators and iterators are mostly written. The guide needs to have a chapter about them, too. Also, we need to outline that people shouldn't use any legacy generators/iterators anymore. (MDN has not much material on those and we also lack reference pages for them). Steps (for everyone who wants to help): * Make a list of all ES6 reference pages for iterators/generators, complete them and post them here. * Do the same for legacy iterators/generators, make sure these pages are all marked as deprecated. * Write/update the chapter in the guide
note that some of above links are corrupted (trailing "*" is dropped)... "The_Iterator_protocol" page contains the section for legacy iterator protocol. It would be better to merge ES6 iterator(iterable) protocol into single page, also, add dedicated page for legacy iterator protocol.
Thank you very much. This is great! \o/ I will review these docs soon and I already reviewed some of them. More notes: There is a chapter about functions which should mention that besides normal functions, generator functions also exist: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions Also, analog to array comprehensions, we need to create a page for generator comprehensions. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Generator_comprehensions (also requested in bug 1060430)
In addition to all the docs mentioned in the previous comments, I also removed legacy iterators and generators from the guide now and added es6 code to it. For historical reasons when can mention legacy things on the reference pages, but a guide and tutorials to JS should be talking about what actually matters and is standardized. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators Closing as we are waaay better than before now. There is always room to improve the docs, though! :)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.