-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stage 2.7 tracking #18
Comments
Do you plan to ask for 2.7 at this meeting? |
@nicolo-ribaudo I was not planning on it, but if I get reviews really soon and the stars align, I could. The deadline for advancement is only a week away. |
As a reviewer:
In #9 I prefer |
GetOption handles coercing to either Boolean or String. Padding can be anything, so we can't use it. I guess we could add a non-coercing option or somehow otherwise refactor it, but then we'd have to coordinate with ecma402 since it's just ripped straight from there.
The iterator helpers do return a Generator through CreateIteratorFromClosure.
There's only one completion record passed to this AO. I'm confused by this feedback.
Yeah I have no opinion on it and I'm just gonna leave it up to committee.
I had (possibly mistakenly) thought we settled that question at the last plenary. I will ask for confirmation that we do not tie that request to this proposal at the next plenary, regardless of whether I go for advancement. I think it's fine to pursue it as a separate proposal if you want, but I think it's too burdensome to ask for it to be included with this one. |
i'm referring to step 2.a of https://tc39.es/proposal-joint-iteration/#sec-closeall - you are creating N ( |
Ah, yeah, exceptions which arise when closing iterators get swallowed when there's already an exception in play - that's how IteratorClose works, anyway. Compare let throwyClose = {
[Symbol.iterator]: () => ({
next: () => ({ done: false }),
return: () => {
console.log('this does get triggered');
throw 0;
},
}),
};
for (let item of throwyClose) throw 1; which prints "this does get triggered" but throws |
The |
I'd prefer iterator stuff to at least be internally consistent without a pretty good reason to deviate. |
alrighty, if there's precedent then it's clearly fine as-is. I think it'd be nice to refactor GetOption so it can work for all options, but obv that's editorial and doesn't need to be part of, nor block, this proposal. Either way once GetOption lands in 262 it'll surely be removed from 402, so they'd presumably just use our version. In that case, consider me signed off. |
Yeah I definitely would not have written |
@nicolo-ribaudo Still waiting on your review here. I'd like to propose this for advancement at the upcoming meeting. |
I'll work on it this weekend 👍 |
@michaelficarra where are we at about array zipping? should i make another proposal and also ask for 2 or 2.7, since the semantics are basically locked in by this one, or should I make a PR to add Array.zip to this proposal? |
@ljharb https://docs.google.com/presentation/d/1Qj5h6MajJnji1obZsXea_cUgfwxur-yT6v-8rBTLqtg/edit#slide=id.g272a2848ddd_0_61. @syg does not seem to have been convinced in #1, and his arguments are starting to move me from neutral to slightly negative as well. |
LGTM ✅ I only one comment on making it easier to read the algorithm, everything else looks good.
|
Review High-level bikesheddingI find both the Options bag handling
|
I would think our newly agreed normative conventions would want us to TypeError here, right?
I went back and forth on this a lot. I also do not like the mutual exclusivity. Using 4 states to represent 3 puts a bad taste in my mouth. But using a string expands that to an infinite space to represent 3 states. We could make them constant fields on
We don't have any string options, so this is moot. I think we can defer the editorial decision for what we do about
We don't, but we do have "Perform the following steps:", so it seems like a natural extension. IIRC @bakkot also wanted to use this form in one of his proposals?
Done.
Done.
Yes, but I didn't think that kind of elaboration about another proposal was necessary in this proposal. It's just a straightforward integration thing. |
Not that I recall, but possibly? We did discuss the option of "Repeat n times:". |
Yeah that's almost certainly what I am remembering. |
Yeah, that's fair.
I think I don't understand the 4-to-3. |
2 Booleans can represent 4 states (and only ever 4 states). We're trying to use them to represent something that has 3 states. So we need to check for that 4th invalid state and throw. That's not a great interface. |
Ah I thuoght the 4-to-3 thing was talking about the enum. I don't see what the problem with using strings is. 402 has it all over the place. |
I don't think we should be taking API inspiration from 402, sorry. |
It's just a very normal thing to have string constants for enum values...? I really don't understand the objection. |
I will add a slide so we can discuss it in plenary. I don't object, I'm just not convinced it's any better. |
This proposal is now at Stage 2.7 41031bf |
API name choices (#9) can be finalised at plenary during advancement IMO.
The text was updated successfully, but these errors were encountered: