Re:FOSDEM 2025: The state of Rust trying to catch up with Ad...
by ziml77 on Monday February 10, 2025 @06:47PM
(#43006836)
The reason to encode it in the type system is it allows for optimization. Option<NonZeroI8> uses a single byte because it knows 0 is available to represent the None state. Option<BalancedI8> could do the same thing with -128 representing None.
[ Parent
| on HN ]
There are no comments on this comment yet.