; Basic variable declaration with and without default values. The type could be ; inferred, but can also be manually specified. let a let b: f64 let c:u64 = 20 ; No infix '=', instead we use `set` to bind values. set a = "hello" set b = 1.2 set c = (1 + 2 - 3) ; Struct definitions. struct vec { x: f32 y: f32 z: f32 } ; Default values are allowed, including const expressions. struct person { name: str = "joe" age: int = 18 * 2 } ; We can use the dot operator to access fields. let player_a: person set player_a.name = "alex" set player_a.age = 32 let player_b = player_a ; Anonymous structs can also be declared inline. let user: { id: u64 name: str } set user.id = 10 set user.name = "haxor" ; We can have anonymous struct fields. struct entity { pos: vec vel: vec attr: { id: u64 name: str } } ; Symbols followed by curly braces output struct literals. let particle = entity { ; Two ways of initializing inner fields. pos = vec { x = 1 y = 2 } attr.id = 1 attr.name = "particle" ; Missing initialization fields default to zero. vel = vec { y = -3 } } ; We can have static arrays and have indexed access. let numbers: u32[0xff] set numbers[0] = 32 set numbers[1] = 42 ; Arrays are syntactic sugar for pointers (@). let ptr:@u32 = numbers set ptr[10] = 33 ; Strings hold a .mem and .size fields with the number of bytes it holds. let hello: str = "hello world" set c[1] = 'a' ; "hallo world"