Editorial: Convert @@ notation to intrinsics notation for well-known Symbols#1314
Editorial: Convert @@ notation to intrinsics notation for well-known Symbols#1314
Conversation
|
@gibson042 i would love to see auto-linking of well-known symbols, with or without this change. I've tested the HTML output locally and atm they don't link anywhere, before or after. |
|
This would also affect the HTML Standard. cc @domenic |
|
Happy with whatever. It would be nice cross-SDO citizenship work to make a corresponding HTML Standard PR, but it's certainly not required. |
|
@domenic i'm happy to try my hand at that once an approach gets consensus here, prior to merging this one. |
|
Would it be possible to use a syntax more similar to |
|
What’d you have in mind? It would have to be apparent that it’s not a property lookup on %Symbol%, i suspect. |
|
Sorry, I don't have a concrete suggestion, and agree it shouldn't imply actual property access. But I would prefer that editorial churn like this would somehow inch us closer to being readable by normal programmers. |
|
My preference would be to use the %SymbolSpecies% notation and move the well-known symbols table to immediately following the intrinsics table. That way we reduce the total number of novel syntaxes in the spec. I don't actually think there is much of an important distinction between intrinsics and well-known symbols except for the cross-realm interaction. They're similar enough that it makes sense to put them near each other and use the same syntax, IMO. |
|
See also #385. |
|
figure-2.png also needs to be updated, since it contains the text |
|
I'm thinking that we should leave things the way they are for now, since |
…c39#1314) - this avoids a conceptual conflict with decorators, when they land
…c39#1314) - this avoids a conceptual conflict with decorators, when they land
|
Decision from the editor call today was to change |
|
True enough, but that's often unavoidable, and in this case, it'll be far more confusing if we have a spec with both decorators and |
|
Decorators don't use |
…c39#1314) - this avoids a conceptual conflict with decorators, when they land
jmdyck
left a comment
There was a problem hiding this comment.
You gave a new clause id to every intrinsic with the property key %Symbol.foo%, except for:
RegExp.prototype [ %Symbol.matchAll% ]%AsyncIteratorPrototype% [ %Symbol.asyncIterator% ]AsyncFunction.prototype [ %Symbol.toStringTag% ]
Did you intend to skip those?
Apart from that, looks okay to me.
|
I didn't do it intentionally, it's just that I only changed the ones that had I could change them to be consistent, but I'm not sure if that's worth the churn + oldids. |
That was my guess at first, but then I noticed that you had introduced new ids to replace
which don't have |
|
Guess I was just being inconsistent in my application then :-) I'll update them to match. |
…c39#1314) - this avoids a conceptual conflict with decorators, when they land
|
@ljharb Out of curiosity: what's up with "luke_skywalker"? |
|
@Josh-Cena this PR kills at-at's |
|
Oh! lmao 😄 |
|
Just want to drop in with an extra thanks to @ljharb for doing the HTML and Web IDL PRs. That kind of cross-ecosystem citizenship is much appreciated. |
|
PR for ECMA-402: tc39/ecma402#905 |
|
whoops, i should have made that one too. thanks! |
Open to bikesheds; other alternatives I considered:
%SymbolSpecies%, and hardcoding that table, while removing the "well-known symbols table". This felt like it would lose some clarity around intrinsics vs well-known-symbols.%Symbol%species%- this would require upstream support in ecmarkup, so i opted not to do it for now.