-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Removes ptr
Introduces
- New types
- Unsigned:
u8, u16, u32, u64, usize - Signed:
i8, i16, i32, i64, isize - Pointers: written with
*before type, for example:*u32
- Unsigned:
- 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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels