plum

#treesitter#compiler#wasm

git clone https://git.pyrossh.dev/plum

A statically typed, imperative programming language inspired by rust, python


66e079b — Peter John 2026-11-05T10:39:36+05:30
backlog: language ideas to discuss later (single inheritance, no init, one error form, Pony)
Files changed (1) hide show
  1. docs/backlog.md +6 -0
docs/backlog.md CHANGED
@@ -20,6 +20,12 @@ Open work, in the order the user queued it, plus smaller items found during buil
20
20
 
21
21
  ## Planned, not yet placed in the queue
22
22
 
23
+ - **Language ideas to discuss later** (user 2026-11-05: "add them ideas to be discussed later"):
24
+ - **Single inheritance only** (user: "makes sense"). After run C only the FIRST embedded struct makes a subtype; later embeds only copy fields/methods. Drop the later embeds and use a plain field (`ship: Ship`) instead: one rule, and most of the field splicing in `embeds.rs` goes.
25
+ - **One way to set up a struct.** Drop `fun init(self)` in favour of field defaults + ordinary constructor functions. `init` is what forces the Boxed layout and the EmbedInit machinery in `ctors.rs`. Main user: `std/game/imperative/Scene.plum`.
26
+ - **Error syntax down to one form** (user 2026-11-05: "just keeping try or ?, rest syntax can be removed"). Decide before writing run D's plan: one propagation form (postfix `?` recommended) on `Option`/`Result`; `?:` → `unwrapOr(..)`, `?.` → `?` or `map`, `catch` → `match`, `E!T` → `Result[T, E]`; `T?` possibly kept as type shorthand for `Option[T]`.
27
+ - **From Pony:** (1) a two-level ownership model (unique + mutable vs shared + immutable, like Pony's `iso`/`val` with `consume`) as the visible face of FBIP, replacing `mut` fields — take into the FBIP plan; (2) no ambient authority: no globals, a function without `Io` provably does no IO — what deterministic sim needs; (3) Pony partial functions (`?`, no error value) argue for `Option` + `?` as the common path and `Result` only when the error value matters. Not copied: union types, structural interfaces, six capabilities.
28
+
23
29
  - **Self-hosting groundwork** (user 2026-11-04: plan now, build later) — `docs/plans/2026-11-04-self-hosting-groundwork.review.md`, design in `docs/self-hosting.md`. All host I/O onto `Io` (`Os.plum` deleted, `io.now()`, `io.httpGet`), then a Plum lexer, a winnow-style combinator library with chumsky-style errors, an AST and a parser in `compiler/` that parses every `.plum` file. AST comparison with the Rust parser and new host calls (args, exit, env, stderr, binary files) wait for cleanup phase 2a. The `Io` move should land before the `Io`-primitive plan above.
24
30
 
25
31
  ## FBIP worklist: `mut` fields left after language-restrictions