Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Language Specification: To Do

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.

1. JSON

  1. undefined-property.

2. DJS

2.1. Module structure

  1. import-attributeswith { type: "json" }, which JavaScript requires of a JSON import and the parser does not accept, and with { type: "text" }, a file imported as a string.

2.2. Priority 1

We need it to use JSDoc and TypeScript.

  1. namespace-import.

2.3. Priority 2

  1. property-accessor,
  2. operators,
  3. grouping,
  4. built-in,
  5. property key as number — { 3e+7: true } (no leading sign allowed),
  6. computed property key from an expression — { [name]: 0 }. The constant-string form is implemented (property keys); the general one waits on expressions.

2.4. Syntactic Sugar

  1. shorthand,
  2. destructuring,
  3. js-string-literals.

3. FJS

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

3.1. Required

  1. function
  2. parameters
  3. body-const
  4. forward-references

3.2. Priority 2

  1. if. See https://developer.mozilla.org/en-US/docs/Glossary/Falsy
  2. let
  3. while
  4. export
  5. Ownership of Mutable Objects (Singletons). Wanted for local mutability (mutability), not for I/O: effects keep I/O state in the runner (io-effects).

3.3. Priority 3

  1. Regular Expressions.
  2. type-annotations
  3. type inference
  4. promise. Needed for JavaScript interop only — I/O is done with effects and requires no promises (io-effects).
  5. class
  6. Temporal classes. See #801

3.4. Syntactic Sugar

  1. expression
  2. one-parameter
  3. assignments
  4. template-literals
  5. async/await. Depends on the implementation of promises.

4. ECMAScript Proposals

  1. Type Annotations, Stage 1:
    • Node.js,
    • Deno supports TypeScript,
    • Bun supports TypeScript,
    • most browsers don't support the feature.
  2. Pipe Operator |>, Stage 2.
  3. 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.
  4. Pattern Matching, Stage 1.
  5. Safe Assignment Operator.
  6. Temporal.

Wish list:

  1. Utf8 String. Something like u8"Hello, world".

Design documents

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.*