Spec text inconsistency
caitp opened this issue · 2 comments
From IRC:
[16:18:12] <caitp> rwaldron: do you notice some inconsistency between
http://rwaldron.github.io/exponentiation-operator/#PostfixExpression
and http://rwaldron.github.io/exponentiation-operator/#sec-update-expressions ?
[16:18:40] <caitp> it looks like the "diff with last spec snapshot" wasn't updated
[16:19:07] <caitp> it's sort of confusing to point that out during review
It would be easier to talk about this feature if this were corrected
per discussion with Dan:
- V8 currently ships the ES6-specified early
ReferenceError
behaviour (so,ReferenceError
for--!x
even in dead code) --- presumably this doesn't break the web or there would be people upset about this. - At some point, this proposal said prefix-count operators had an
LeftHandSideExpression
operand rather than aUnaryExpression
operand. If this were the case,--!x
would become aSyntaxError
rather than aReferenceError
. - This seems to be changed back to its original (ES6) state --- but there is some inconsistent text between those two URLs mentioned above, which makes it unclear.
- Either way, this is an early error, and either way, it basically matches what already happens, so it shouldn't break the web
The only issue here is fixing the editorial bug, in order to clarify whether --!x
becomes a SyntaxError
, or remains an early ReferenceError
.
I am fairly confident that the proper change is fixing http://rwaldron.github.io/exponentiation-operator/#PostfixExpression to match http://rwaldron.github.io/exponentiation-operator/#sec-update-expressions
Images of what I'm talking about, because it seems to be very hard to convey this:
http://rwaldron.github.io/exponentiation-operator/#sec-update-expressions:
http://rwaldron.github.io/exponentiation-operator/#PostfixExpression:
In other words, it's just a little editorial issue that makes it hard to talk about this feature during code review