3 ms·
Zig allows any uX and iX in the range of 1 - 65,535, as well as u0
by Cloudef 2y ago
Zig allows any uX and iX in the range of 1 - 65,535, as well as u0
- renox 2y agou0?? Why?
- xigoi 2y agoTo avoid corner cases in auto-generated code?
- Cloudef 2y agoTo represent 0 without actually storing it in memory
- whs 2y agoSounds like zero-sized types in Rust, where it is used as marker types (eg. this struct own this lifetime). It also can be used to turn a HashMap into a HashSet by storing zero sized value. In Go a struct member of [0]func() (an array of function, with exactly 0 members) is used to make a type uncomparable as func() cannot be compared.