News for hackers. Stuff that matters.
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
Re:C++ proposal: There are 8 bits in a byte by whs on Friday October 18, 2024 @11:35PM (#41885460)
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.