ecmarkup icon indicating copy to clipboard operation
ecmarkup copied to clipboard

Structured header for a redefinition should support identifying the clause being superseded

Open gibson042 opened this issue 3 years ago • 2 comments
trafficstars

The boilerplate for an operation that supersedes another of identical name (generally ECMA-402 updating ECMA-262) is something like This definition supersedes the definition provided in <emu-xref href="#sec-…"></emu-xref>. (cf. ECMA-402 and Temporal). It would be great if the redefinition key supported not just true but rather an identification of the clause being superseded to be used as a source for generating such boilerplate, or failing that if a sibling key specified the same information (although that seems less useful because a redefinition should always be covering something).

But note that pursuing this path should also invert the suppression logic—the aoid should be assigned to and inbound links should reference the operation identified as a redefinition rather than the operation being superseded. But having written that, it seems beneficial anyway.

gibson042 avatar Jun 09 '22 22:06 gibson042

I think this makes sense when redefining AOs defined in other documents. I don't think it's particularly sensible when redefining an AO in the same document, right?

bakkot avatar Jun 09 '22 23:06 bakkot

I think it still makes sense. If both operations are in the same document, then it would be convenient for following an auto-link from a call site to make clear that there is an override, and if the link from overridor to overridden is also generated as suggested then there's a quick way to get to the overridden operation with a second interaction.

This issue brought to you by forgetting about the PrepareTemporalFields override when working on https://github.com/tc39/proposal-temporal/pull/2255 , which is precisely such a same-document situation (see also what the structured header for a same-document overriding operation looks like without this improvement: spec/intl.html).

gibson042 avatar Jun 10 '22 02:06 gibson042