Pointers: written with * before type, for example: *u32
Typed integer literals (like 1u64, 0xdead_i32)
usize and isize are type aliases for type that matches their bit length. For example isize == i64 <=> sizeof(isize == i64)
Memory declarations produce pointers with correct type. For Foo 1 []u32 holds typeof(Foo) == u32
Conversion from smaller type to bigger type is implicit given their both (un)signed. (Not sure about this, time will tell)
Pointers
Addition, subtraction, load, store have different meaning according to what pointer is pointing to.
For example: *i32 + u64 is val(*i32) + 4 * val(u64) (same as C)
Removes
ptr
Introduces
u8, u16, u32, u64, usize
i8, i16, i32, i64, isize
*
before type, for example:*u32
1u64
,0xdead_i32
)usize and isize are type aliases for type that matches their bit length. For example
isize == i64 <=> sizeof(isize == i64)
Memory declarations produce pointers with correct type. For
Foo 1 []u32
holdstypeof(Foo) == u32
Conversion from smaller type to bigger type is implicit given their both (un)signed. (Not sure about this, time will tell)
Pointers
Addition, subtraction,
load
,store
have different meaning according to what pointer is pointing to. For example:*i32 + u64
isval(*i32) + 4 * val(u64)
(same as C)