You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.adoc
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,12 +76,16 @@ On top of that core, the language supports _faces_: sugared surface syntaxes tha
76
76
77
77
A face is not a separate language. It is a different presentation layer over the same core model.
78
78
79
-
Examples include:
79
+
The established faces are:
80
80
81
81
- *AffineScript* — the canonical face
82
-
- *JaffaScript* — a JavaScript-like face
83
-
- *RattleScript* — a Python-like face
84
-
- *PseudoScript* — a pseudocode-oriented face
82
+
- *JaffaScript* — a JavaScript / TypeScript-like face
83
+
- *RattleScript* — a Python-like face (also positioned as "Python for the web" via typed-wasm)
84
+
- *PseudoScript* — a pseudocode-oriented face for CS pedagogy
85
+
- *LucidScript* — a PureScript / Haskell-like face
86
+
- *CafeScripto* — a CoffeeScript-like face
87
+
88
+
Every face shares the canonical `.affine` file extension; the active face is selected by an optional `face:` pragma on the first comment line of the file (e.g. `# face: rattlescript`, `// face: jaffascript`, `-- face: lucidscript`), or by `--face NAME` on the CLI.
85
89
86
90
This means people can bring familiarity from a language family they already love, while still entering a system with stronger guarantees around ownership, effects, state, and resource usage.
87
91
@@ -312,11 +316,15 @@ face syntax -> AffineScript core AST -> type/effect/ownership checks -> ba
312
316
313
317
Examples:
314
318
315
-
- JaffaScript lowers JavaScript-like syntax into the AffineScript core
319
+
- JaffaScript lowers JavaScript / TypeScript-like syntax into the AffineScript core
316
320
- RattleScript lowers Python-like syntax into the same core
317
321
- PseudoScript lowers structured pedagogical pseudocode into the same core
322
+
- LucidScript lowers PureScript / Haskell-like syntax into the same core
323
+
- CafeScripto lowers CoffeeScript-like syntax into the same core
324
+
325
+
Side-by-side examples for each face live under `examples/faces/`; you can preview the canonical lowering of any file with `affinescript preview-python` / `preview-js` / `preview-pseudocode` / `preview-lucid` / `preview-cafe`.
318
326
319
-
So the question is not “which face is the real language?”
327
+
So the question is not “which face is the real language?”
320
328
The answer is: the core semantics are the language; faces are entrances.
0 commit comments