-
Notifications
You must be signed in to change notification settings - Fork 10
Stage 3 Specification Review: Philip Chimento #21
Comments
@ptomato: have you had an opportunity to review the specification text? |
I intend to do it today and Monday 😄 |
I've completed my review today, I had the advantage of going last after others had gone over the spec text before me 😄 Here are my comments, all of them quite minor:
|
Probably, but it's not this project's fault; the biblio is quite stale. It will link properly in the actual spec when this is upstreamed.
Yeah, sorry, that changed literally yesterday. I wouldn't worry about fixing up this proposal; I'll make sure it's right as part of the upstream PR. |
I'll have to look into that. I believe the spec text in that section has changed since I first wrote the spec text for the proposal. I believe its intended to go between "function" and "module" environment records here: Not precisely. The class static block environment record is modeled after a function environment record, which only includes a note on what "lexical" means:
The wording is based on the same wording we use for function f() { // function boundary
let await; // legal here
class C {
static { // static block boundary, do not cross
let await; // illegal here, directly nested
{
let await; // illegal here, indirectly nested
}
function g() { // function boundary, do not cross
let await; // legal here
}
class D {
static { // static block boundary, do not cross
let await; // illegal here, directly nested
}
}
}
}
}
IIRC, cross references are only defined when an algorithm as an
I actually fixed that a few hours ago, you can see it updated in the current version of the proposal spec text: https://tc39.es/proposal-class-static-block/#sec-runtime-semantics-classdefinitionevaluation. I was planning on rebasing that algorithm on the "class static features" proposal (which is supposed to be a diff from the class fields proposal), but I believe the spec text in that proposal is stale or out of sync. |
That was true up until last night, but it does now! (To be clear, I'm mentioning this because I'm excited about the change in ecma262, not because I think this proposal needs to do anything about it.)
AFAICT ecmarkup never actually had support for that. ecma262 contained such elements, but they didn't do anything, and I got rid of all of them in the above-mentioned PR. |
How does this affect the readability of the spec? Previously the operations were adjacent to their syntax definitions in the spec. It seems like it would make it harder to follow. Previously I would have looked for how identifiers are handled under https://tc39.es/ecma262/#sec-identifiers, but now they're moved to another part of the spec entirely (with no, "this can be found here"-like mention, kind of like https://tc39.es/ecma262/#sec-constructor-properties-of-the-global-object). I'm not entirely sure I'm a fan of that change, to be honest. |
For ecmarkup, I would been happy with multiple algorithms having the same AOID show up as a list of references when you click the link (like we do for the "References" link when hovering over a definition). Even if the spec has been reorganized to avoid this, I think it still might be valuable. Regardless, both this and my last comment are off topic for this discussion. |
I think it's a massive improvement. Having the definition for each SDO in a single place makes it much easier to see what they do, and matches the conceptual model: generally the question one has is "what does this SDO do?", not "what are all of the various ways that SDOs are defined over this syntactic form?". We've described this planned change at each of the last four meetings, as well as in an issue which has been open since April, to exclusively positive feedback, so I think that's the common sentiment.
Yeah, we intend to have links from the definition to all of the SDOs defined over it. The work in ecmarkup is done, but it's blocked by a PR to grammarkdown. Anyway, happy to continue this conversation in tc39/ecma262#1950 or in a new issue. |
I'll look at the grammarkdown PR. I don't recall seeing it in my notifications, but its been a busy two months. |
Thanks! The #34 PR looks like it ought to clear things up for me. I think the only unresolved point is this:
What I meant was that the |
Since (hopefully) the intent is clear, its more of an editorial discussion that (also hopefully) shouldn't be a stage 3 blocker. |
@ptomato - Thanks for your review! |
This is a placeholder task for Stage 3 Specification Review feedback from Philip Chimento (@ptomato), per https://github.com/tc39/notes/blob/master/meetings/2020-09/sept-22.md#class-static-initialization-block-for-stage-2
The text was updated successfully, but these errors were encountered: