-
-
Notifications
You must be signed in to change notification settings - Fork 4
array
Pannous edited this page Jan 12, 2022
·
3 revisions
Arrays are lists of fixed type and possibly predefined length. Vectors are (numerical) lists of fixed type and fixed length.
x:int[10]
y:char[20]
z:person[]
Note that in angle, char is shorthand for utf-8 character ( codepoint )
Internal note: Angle arrays are allocated in wasm linear memory, thus on 'heap' so to speak.
Todo: python style array or hash initialization: a=[] b={}
vector / array => “generic lists are just written as the plural, in this case ‘persons’”
A tuple is a list with fixed length and fixed size. A named tuple is a map with fixed keys, length and size.