-
Notifications
You must be signed in to change notification settings - Fork 6
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
What's blocking this from becoming a stage 3 proposal? #12
Comments
According to @rbuckton in this other comment, it's blocked (or at least was blocked) from advancement to stage 3 due to overlap with the |
Any news on this? |
It seems that the fact that either |
Is this not going anywhere? :( |
I think do expression proposal is more about IIF than "is throw an expression or a statement" (btw do expression proposal also question about if/else statement or expression... but that's another topic). Sure it gets around the throw statement problem, but does resolve the root problem. Moreover it is still really immature and we won't see it before a while and they do not have any conflict. To me, the question is 'should "throw x" be assignable to something or not ?' let's list some arguments :
|
I don't know if saying this here is very useful, but in case it is, I would want |
My read of the notes linked above is that there's near-consensus that Kevin Gibbons in particular seemed skeptical, and raised the bugbear of precedence issues (does I think the committee's sense (probably even Kevin Gibbon's sense) is that the community would strongly prefer to be able to use throw expressions to using throw statements in do expressions. I may be misreading the notes, and those were from 2018 - I'm not sure if relevant discussion has occurred since. |
Ah, yes, I saw the discussion on operator precedence. It seems like the main question there is: whether to require parentheses, or whether to have inconsistent comma operator precedence. I would prefer the inconsistent comma operator precedence (alternatively, a weirder compromise: don't require parens unless it's followed by a comma, in which case require But honestly, I just want to be able to use this! |
I think it's very easy to resolve the problem of operator precedence. Change the syntax from |
@Jack-Works that's also an option, mentioned in #10 (comment) I don't hate it, but I don't like it, either. I prefer having the same syntax for expressions and statements, and I don't think the comma issue is important enough to be worth requiring the parens. Even if we did require the parens, I'd prefer for them to be outside, like |
Discussion of precedence belongs in a separate thread. |
That thread is #10 |
It's a very similar problem to
|
That would behave incompatibly with the throw Promise.resolve(4) + 2; // currently throws "[object Promise]2" |
As far as I can see, all of the other 4 issues have either reached a consensus or are non-issues.
What's currently blocking this proposal from advancing, and how can we unblock it?
The text was updated successfully, but these errors were encountered: