diff options
author | Himbeer <himbeer@disroot.org> | 2024-08-30 22:03:13 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-08-30 22:03:13 +0200 |
commit | 0e806f6a119f3f4ee31d3b52ec8eaf4415f2da4e (patch) | |
tree | 803c829390b5e517da98218ecd740882f4dff517 /TYPE_SYSTEM.md | |
parent | 11de07f6cc4c78169987670db5b5417a0176f2bb (diff) |
Add support for assignments to mutables
Diffstat (limited to 'TYPE_SYSTEM.md')
-rw-r--r-- | TYPE_SYSTEM.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/TYPE_SYSTEM.md b/TYPE_SYSTEM.md index 56baa91..fb45232 100644 --- a/TYPE_SYSTEM.md +++ b/TYPE_SYSTEM.md @@ -17,8 +17,9 @@ SPDX-License-Identifier: CC-BY-NC-SA-4.0 # Declaration and mutability -* Variables and constants need to be declared before being used +* Variables need to be declared before being used * All declarations (including globals and implicit declarations from imports) must be above their first use * Redeclarations ("shadowing") are forbidden * Variables may be changed using the "assign" statement -* Constants cannot be changed +* Constants cannot be changed, but mutables can +* Local mutables are allocated on the stack, local constants are QBE temporaries |