about summary refs log tree commit diff stats
path: root/mu.md
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-09-29 03:41:05 -0700
committerKartik Agaram <vc@akkartik.com>2020-09-29 03:41:05 -0700
commitf334aa73e94f2d3787f431a444b347c33afc0bde (patch)
treeb1f557dd8aea9ea5aa9c94209410c892e08f7fd5 /mu.md
parent9aea89ba73280bcaeee67f6bd01f725a9698b344 (diff)
downloadmu-f334aa73e94f2d3787f431a444b347c33afc0bde.tar.gz
6897
Diffstat (limited to 'mu.md')
-rw-r--r--mu.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/mu.md b/mu.md
index 9c26dd67..9ed2f693 100644
--- a/mu.md
+++ b/mu.md
@@ -470,6 +470,13 @@ type point {
 
 Mu programs are currently sequences of `fn` and `type` definitions.
 
+Compound types can't include `addr` types for safety (use `handle` instead).
+They also can't currently include `array`, `stream` or `byte` types. Since
+arrays and streams carry their size with them, supporting them in compound
+types complicates variable initialization. Instead of defining them inline in
+a type definition, define a `handle` to them. Bytes shouldn't be used for
+anything but arrays of bytes (utf-8 strings).
+
 To access within a compound type, use the `get` instruction. There are two
 forms. You need either a variable of the type itself (say `T`) in memory, or a
 variable of type `(addr T)` in a register.