36 - Goal 1 holds that every call answers, Goal 8 says what correct means #137

Merged
lilleman merged 2 commits from 36-goal8 into main 2026-09-28 10:46:17 +02:00
Showing only changes of commit ff23145a5a - Show all commits
+4 -3
View File
@@ -27,7 +27,7 @@ In priority order.
1. **Lossless first.** The round-trip holds for every document the lossless conversions take, node 1. **Lossless first.** The round-trip holds for every document the lossless conversions take, node
types this version does not know included; one that has no spelling is refused and says where, types this version does not know included; one that has no spelling is refused and says where,
never silently reduced. never silently reduced. Every call answers: no input makes one hang or overflow the stack.
Every goal below gives way to this one. Every goal below gives way to this one.
2. **ADF is the hub.** Every format and flavour converts to and from ADF, and no two others 2. **ADF is the hub.** Every format and flavour converts to and from ADF, and no two others
convert directly: markdown↔HTML composes through ADF. Adding a format or flavour costs one convert directly: markdown↔HTML composes through ADF. Adding a format or flavour costs one
@@ -49,8 +49,9 @@ In priority order.
the emitted formats are. the emitted formats are.
7. **Nothing in the way.** No runtime dependencies, no I/O, no configuration, no host API: ESM on 7. **Nothing in the way.** No runtime dependencies, no I/O, no configuration, no host API: ESM on
any ES2022 engine, in a browser as readily as on a server, installed from public npm. any ES2022 engine, in a browser as readily as on a server, installed from public npm.
8. **Correct before fast.** A whole document in, a whole result out, one call; no input makes a 8. **Correct before fast.** Each format is read and written as its own specification defines it —
call hang or overflow the stack. markdown as CommonMark's spec suite reads it, well-formed HTML as the HTML standard parses it —
and a call takes a whole document and returns a whole result.
9. **Fast once correct.** Conversion time grows linearly with the document wherever the goals above 9. **Fast once correct.** Conversion time grows linearly with the document wherever the goals above
allow it; a faster path that risks one of them is not taken. allow it; a faster path that risks one of them is not taken.