Normative: add Iterator.zip and Iterator.zipKeyed#3802
Conversation
|
The rendered spec preview for this PR is available as a single page at https://tc39.es/ecma262/pr/3802 and as multiple pages at https://tc39.es/ecma262/pr/3802/multipage . |
e242a5a to
2d41fb7
Compare
| 1. If _mode_ is *"longest"*, then | ||
| 1. Set _paddingOption_ to ? Get(_options_, *"padding"*). |
There was a problem hiding this comment.
It's a bit odd to read padding only when mode is "longest" (rather than unconditionally), but it was present from the start and is covered in test262. I'm not objecting, but do want to draw attention to this behavior.
|
|
||
| <emu-clause id="sec-iterator.zip"> | ||
| <h1>Iterator.zip ( _iterables_ [ , _options_ ] )</h1> | ||
| <p>This method performs the following steps when called:</p> |
There was a problem hiding this comment.
| <p>This method performs the following steps when called:</p> | |
| <p>This function performs the following steps when called:</p> |
... because it's not a property of a prototype and doesn't reference *this*? (There's nothing in Editorial Conventions to say.)
There was a problem hiding this comment.
We could add an editorial convention for this if we can come up with a good rule.
|
Oh, I forgot to mention: it's unusual to have the section for an AO (in this case |
This seems like the most appropriate place, though. Where would you put it? |
Precedent elsewhere in the spec would suggest nesting it within the section for E.g.,
Alternatively, the spec sometimes puts AOs in an "Abstract Operations for Foo" section after the "Properties of Foo" section. |
I like this approach. |
Pending Stage 4 for https://github.com/tc39/proposal-joint-iteration. Fixes tc39/proposal-joint-iteration#48.