Re:C++ proposal: There are 8 bits in a byte
by Cloudef on Friday October 18, 2024 @04:02AM
(#41877281)
Zig allows any uX and iX in the range of 1 - 65,535, as well as u0
[ Parent
| on HN ]
Re:C++ proposal: There are 8 bits in a byte
by renox on Friday October 18, 2024 @11:22AM
(#41880263)
u0??
Why?
Re:C++ proposal: There are 8 bits in a byte
by xigoi on Friday October 18, 2024 @11:55AM
(#41880597)
To avoid corner cases in auto-generated code?
Re:C++ proposal: There are 8 bits in a byte
by Cloudef on Friday October 18, 2024 @11:01PM
(#41885321)
To represent 0 without actually storing it in memory
Sounds 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.