From 1f25d9256c01e8047793a4525cc561f72c2d976e Mon Sep 17 00:00:00 2001 From: Alexander Nutz Date: Fri, 12 Sep 2025 11:08:43 +0200 Subject: [PATCH] v0.0.8: no more mutability --- spec.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/spec.md b/spec.md index d07af05..3a883a3 100644 --- a/spec.md +++ b/spec.md @@ -10,7 +10,6 @@ Most important ones: - `List[T]`: (linked-) list of `T` - `Char`: unicode codepoint - `Unit`: nothing -- `Cell[T]`: mutable cell of `T` Advanced (uncommon) types: - `Int8`, `Int16`, ... @@ -42,14 +41,6 @@ let name = "Max" let passw = "1234" ``` -## Mutability only via `ref` -``` -let value = Cell.from(1) -print(Num.to_str(!value)) # !cell "observes" the cell -value := 2 # `:=` mutates the cell -print(Num.to_str(!value)) -``` - ## no confusing function or operator overloading all operators: - `Num + Num` (has overloads for fixed width number types) @@ -60,8 +51,6 @@ all operators: - `List[t] ++ List[t]`: list concatenation - `value :: t` (explicitly specify type of value, useful for down-casting structs, or just code readability; does not perform casting) - `list[index]` -- `!cell`: "observe" a mutable value -- `cell := value`: mutate a mutable value ## non-nominal struct types ```