-
Notifications
You must be signed in to change notification settings - Fork 87
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
Small tweaks to "Local variable declarations" #1208
Merged
RexJaeschke
merged 6 commits into
dotnet:draft-v8
from
RexJaeschke:Tweaks-to-local-variable-declarations
Nov 17, 2024
Merged
Small tweaks to "Local variable declarations" #1208
RexJaeschke
merged 6 commits into
dotnet:draft-v8
from
RexJaeschke:Tweaks-to-local-variable-declarations
Nov 17, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nigel-Ecma
requested changes
Nov 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert explicitly_typed_ref_local_variable_declarators. The rest looks good and I approve in advance once the reversion is done.
Co-authored-by: Nigel-Ecma <perryresearch@zoot.net.nz>
Co-authored-by: Nigel-Ecma <perryresearch@zoot.net.nz>
Nigel-Ecma
approved these changes
Nov 17, 2024
Co-authored-by: Kalle Olavi Niemitalo <kon@iki.fi>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
meeting: discuss
This issue should be discussed at the next TC49-TG2 meeting
meeting: proposal
There is an informal proposal in the issue, worth discussing in a meeting
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[This proposal is the result of a private conversation I had with Nigel, and is intended to reflect our final agreement.]
I’m working on the spec for a future feature that involves changes to §13.6.2.1 General, in the grammar that starts with rule local_variable_declaration. However, once I started reading the draft V8 spec of that section, I got confused. I think some text, a grammar rule name, and a section name are misleading, and I’d like to change them before I continue with the other task.
In V6 (prior to the addition of ref/ref-readonly on locals), this section was simple, but as the grammar allowed all kinds of invalid constructs w.r.t implicitly typed local variable declarations, there was a non-trivial bullet list of constraints expressed in text. My original proposal for the V7 feature ref/ref-readonly locals involved light edits to that section. However, it appears that during TG2’s integration of that feature, the grammar was completely rewritten to incorporate all the previous text constraints, and broken into 3 subparts, each of which got its own new section (along with a General intro), as follows:
§13.6.2.1 General starts by saying
My interpretation was that this implied the three categories are mutually exclusive, when they are not! (A ref local could be implicit or explicit.) In any event, Nigel and I agreed to disagree on that interpretation, but we agreed this para adds no value and should be removed.
We agreed to rename rule ref_local_variable_declaration to explicitly_typed_ref_local_variable_declaration, which requires Section “13.6.2.4 Ref local variable declarations” to be renamed “13.6.2.4 Explicitly typed ref local variable declarations” with any links to that section being updated.
The grammar in “13.6.2.2 Implicitly typed local variable declarations” contains ref_kind, but doesn’t explain that, so a pointer to “13.6.2.4 Ref local variable declarations,” which does explain that, should be added.