plum
git clone https://git.pyrossh.dev/plum
A statically typed, imperative programming language inspired by rust, python
a9e4592
— Peter John
2026-11-04T20:49:52+05:30
docs: run A keeps the range keyword
docs/plans/2026-11-04-language-simplification-a.md
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
- Grammar edits: regenerate with `tree-sitter generate --disable-optimizations` (the default optimizer silently breaks unrelated parses); update corpus fixtures.
|
|
13
13
|
- Gate for every task: workspace test binaries pass and `plum test plum-std plum-examples` passes (678 today; the count may change only by tests this plan deletes or adds, each listed). Wasm bytes may change.
|
|
14
14
|
- Never run `plum format` on real files. Don't commit.
|
|
15
|
+
- Keep `for i := range n` and the `range` keyword exactly as they are (user 2026-11-04); `for x := s` over `next()` is added alongside it, never instead of it.
|
|
15
16
|
- Rulings from the user (2026-11-04): list literal syntax `[a, b, c]` (brackets at expression start; `[]` stays generics after a type name), a pure parser desugaring to `List.empty().append(a).append(b).append(c)` — no `init` method on List or Map (both `init`s are deleted); `[]` is `List.empty()` (element type from the annotation or use); a Map literal `["a" => 1, "b" => 2]` desugars to `Map.empty().set("a", 1).set("b", 2)` (coordinator default, user may change); `Seq` becomes a struct holding a `next` step closure returning `T?`, and `for x := s` loops over anything with `next(self) -> T?`.
|
|
16
17
|
|
|
17
18
|
## Task graph
|