https://esdiscuss.org/topic/set-iterators

(site: search again, but I admit I used deterministic and tyler close keywords to help.)

/be

Benjamin (Inglor) Gruenbaum wrote:
Hi, I recently answered a question on StackOverflow about set iteration order which made me read the spec.

I remember the recent "Set.prototype.entries: indices as keys" discussion but I couldn't figure out if the fact sets and maps are ordered on insertion order is specified is intentional and an artifact. The spec looks crafted in a way it looks intentional, for example in set:

 - Set.prototype.add always adds to the end of the entries list
- Set.prototype.delete does not delete from the list but rather sets the value to `empty` - Iteration in %SetIteratorPrototype%.next iterates entries by index and in order.

Am I understanding this wrong or is set iteration order specified (same for map)?

Can anyone please refer me to previous discussions on this when the decision was made? I can't seem to find the relevant material and I'm interested in the rationale.

Thanks again!
Benjamin
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to