ecma262 icon indicating copy to clipboard operation
ecma262 copied to clipboard

Documenting editorial conventions

Open bakkot opened this issue 4 years ago • 6 comments

The editors should write down editorial conventions for the benefit of contributors and future editors, perhaps in tc39/how-we-work.

I've tried to automatically enforce some of them in ecmarkup. But there's plenty of others. Let's use this issue to collect them for now.

  • Oxford spelling
  • conventions for spec lists, and also conventions for Records
  • when a PR is Editorial, Normative, or Meta (especially around spec bugs: I believe we have an unwritten rule along the lines of "if the spec is nonsensical or contradictory as written, but there is a plausible interpretation which is followed by all major engines, then it is Editorial". When it is coherent but does not match what we believe to be the clear intent, and engines follow that intent rather than the spec as written, we will mark it as Normative but not require consensus from plenary to merge (e.g.).)
  • the format of preambles for various operations (https://github.com/tc39/ecma262/pull/1914, https://github.com/tc39/ecma262/pull/1994)

bakkot avatar Nov 29 '20 03:11 bakkot

Might be a good use of GitHub's wiki feature? They can be configured so that only maintainers can make edits.

michaelficarra avatar Dec 08 '20 23:12 michaelficarra

Here's a good one: under what circumstances do we pre-declare our aliases? See e.g. https://github.com/tc39/ecma262/pull/1908#discussion_r395920968, https://github.com/tc39/ecma262/pull/2221#discussion_r543987103.

bakkot avatar Dec 16 '20 05:12 bakkot

As of #2547, we should also include the rules for completion records: use of ! / ? / Completion(...) for calls of completion-record-returning AOs, non-use of those things for non-completion-record-returning AOs.

bakkot avatar Mar 02 '22 23:03 bakkot

We prefer spec enums over strings/constructors/instrinsics where they are just being switched over (aka used as an enum). See https://github.com/tc39/ecma402/pull/689

michaelficarra avatar Jun 07 '22 15:06 michaelficarra

We generally do validation first, then the happy path. So e.g. 1. If not in range, throw. 2. Return value., rather than 1. If in range, return value. 2. Throw.

bakkot avatar Jun 11 '23 22:06 bakkot