Documents for language features that the fjs parser does not recognize
yet, and design documents for parts of the system that are not implemented.
Each file is a working draft: it may mix specification text with design
notes, alternatives, and implementation sketches.
When the parser recognizes a feature, its document is folded into the single language specification — the one document that describes what the compiler accepts today — and this file's entry is removed. The numbering below is this directory's own; the specification has no section numbers.
- import-attributes —
with { type: "json" }, which JavaScript requires of a JSON import and the parser does not accept, andwith { type: "text" }, a file imported as a string.
We need it to use JSDoc and TypeScript.
- property-accessor,
- operators,
- grouping,
- built-in,
- property key as number —
{ 3e+7: true }(no leading sign allowed), - computed property key from an expression —
{ [name]: 0 }. The constant-string form is implemented (property keys); the general one waits on expressions.
The FJS can have functions. The format requires additional run-time information for serialization: an FJS value can't be serialized without it — see serialization.
| format | any | Notes | |
|---|---|---|---|
| FJS | function | Func | function |
-
if. See https://developer.mozilla.org/en-US/docs/Glossary/Falsy - let
-
while - export
- Ownership of Mutable Objects (Singletons). Wanted for local mutability (mutability), not for I/O: effects keep I/O state in the runner (io-effects).
- Regular Expressions.
- type-annotations
- type inference
- promise. Needed for JavaScript interop only — I/O is done with effects and requires no promises (io-effects).
- class
- Temporal classes. See #801
- expression
- one-parameter
- assignments
- template-literals
-
async/await. Depends on the implementation of promises.
- Type Annotations, Stage 1:
- Node.js,
Denosupports TypeScript,Bunsupports TypeScript,- most browsers don't support the feature.
- Pipe Operator
|>, Stage 2. - Records and Tuples, withdrawn
(the repository was archived in April 2025):
One problem with such records and tuples is that they can't hold safe, immutable functions. Maybe we need something like
#(a) => a * 2. - Pattern Matching, Stage 1.
- Safe Assignment Operator.
- Temporal.
Wish list:
- Utf8 String. Something like
u8"Hello, world".
Design decisions and sketches for the unimplemented parts of the system, moved here from the main spec README and keeping their old section numbers:
| Document | Topic |
|---|---|
| io-effects | §5 — I/O with effects: Effect, operations, runners |
| content-addressable-vm | §6 — content-addressable VM, hashing |
| object-identity | §7 — object identity, custom dictionaries, Map |
| mutability | §8 — mutable objects and ownership tracking |
| serialization | §9 — EDAG as data, CBOR, bytecode as VM-internal |
| vm-command-format | NPN command format of the VM |
| design-principles | design principles of the "ideal" FS 0.* |