plum
git clone https://git.pyrossh.dev/plum
A statically typed, imperative programming language inspired by rust, python
ed1be37
— Peter John
2026-11-07T11:45:48+05:30
Simpler language: results, not merged
docs/plans/2026-11-06-simpler-language.results.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# A simpler language: results
|
|
2
|
+
|
|
3
|
+
**Outcome:** not merged. After the benchmark, the user chose a simple imperative OOP compiler for `master` (2026-11-07), so this branch stays as the comparison. `master` keeps the old language until docs/plans/2026-11-07-simple-imperative.md lands.
|
|
4
|
+
|
|
5
|
+
**Numbers and method:** docs/imperative-vs-functional.md and docs/plans/2026-11-06-simpler-language.benchmark.md.
|
|
6
|
+
|
|
7
|
+
## What the branch did
|
|
8
|
+
|
|
9
|
+
- T1 to T14 are done on `simpler-language`, and test-all passes at its tip.
|
|
10
|
+
- Removed: inheritance, two of three game styles, `return`, `break`, `continue`, local reassignment, `Array.with`, `withUnique`, the pilot `Vec`.
|
|
11
|
+
- Added: modules, block closures, `?` as a rewrite into `match`, block `if` and `match` values, `.=`, spread paths, loops lifted to functions, an in-place proof keyed by receiver type with last-use moves and unique versions of functions.
|
|
12
|
+
- T15 was cut down to this page: the branch's language docs (`docs/language.md` and others) weren't rewritten, since the branch isn't going forward. They still describe the old language.
|
|
13
|
+
- The final review was skipped for the same reason, so `T10`'s loop lowering only had a Sonnet review.
|
|
14
|
+
|
|
15
|
+
## Deleted tests
|
|
16
|
+
|
|
17
|
+
Listed in docs/plans/2026-11-06-simpler-language.t9-notes.md, plus these from `T10`: tests/fbip/array_with.plum, array_in_place.plum, array_names.plum, uvec.plum; 17 "array:" tests in tests/fbip/aliasing.plum; 5 `array_with_*` tests in codegen_tests; `alias_kept`, `shared_by_another_caller`, `update_inside_a_closure` in fip_test.
|
|
18
|
+
|
|
19
|
+
## Bugs found on the way, worth carrying across where the code still exists on master
|
|
20
|
+
|
|
21
|
+
- `plum build` of a CLI program looked for the runtime crate in the wrong folder (already fixed on master, 8533644).
|
|
22
|
+
- A closure copy's name could collide across types with the same bare method name.
|
|
23
|
+
- `typeNameMethodKey` refused `$` names, so `xs.fold(0, f)` in tail position failed to compile.
|
|
24
|
+
- A closure body could reassign a local.
|
|
25
|
+
- Evaluation of constructor values: they run in declaration order, not written order.
|
|
26
|
+
- A type error in a `for` source was hidden.
|