You forgot my proposal ![]()
Proposals: Syntax and Semantics
| explicit “show code” semantics | explicit “execute code” semantics | non-explicit, do what is usually expected / most natural | |
|---|---|---|---|
| A | mermaid |
!mermaid |
|
| B | mermaid |
draw:mermaid |
|
| C | mermaid_src |
mermaid |
|
| D | mermaid = |
mermaid () ormermaid ( … ) |
mermaid |
-
A: not bad, but breaks existing things, and “rare case should not “poison” major cases”
-
B: readable, but uses English, and same problems as
A -
C: reflects usage frequency, but then some users will naturally start using
markdown_srcand evenjavascript_src, so those should be supported. Also, for those things likejavascriptandmarkdownthat by default are “show code”, how do you say “execute code”? Will we then addmarkdown_draw? If we do, we’ve ended up doingD, but not as nicely. -
D: semantics of non-explicit form reflects usage frequency. Author can always choose to be explicit. Is consistent and logical (semantic explicitness in both cases is syntactically explicit). Does not use English. Tokens make sense. Uses second token rather than modding the first, so more backward compatible, degrades gracefully in vast majority of cases.