ecma262
ecma262 copied to clipboard
Editorial: replace steps embedded in lookup tables with more typical algorithms
This will help us catch editorial errors (it already caught 1) and IMO reads better by allowing for other groupings (such as by output in ToBoolean).
I'd recommend reviewing before/after rendering instead of reading the changeset.
There's probably more opportunities to replace tables, but this is a good start.
so many claps; this is awesome
This seems to me to be worse; I'd mildly prefer to leave as-is.
Worse how? Algorithm steps are so much clearer imo than a table.
I find the table easier to read /shrug
I'm actually really happy with this change. It exceeded my expectations.
The ids of the former <emu-table> elements should maybe become oldids on the respective <emu-clause> elements.
@jmdyck Good point. Done.
I think the algorithmic steps here help clarity over tables, especially when reviewing implementations. It'd also be nice to have this be precedent setting as editorial style to not loop over tables in algorithmic steps. To wit I'd like to tell 404 proposal authors to stop doing stuff like step 17 here in the Intl.DurationFormat proposal.
I'm fine with this approach, then.
@syg @bakkot Can I get a review for correctness then?
@bakkot Addressed comments.