News for hackers. Stuff that matters.
Re:How to pack ternary numbers in 8-bit bytes by mcherm on Tuesday July 21, 2026 @08:33AM (#48991507)
The "mistake" was not in providing a way to represent "no data", it was in providing no way to represent "this definitely HAS" data.

Languages that correct the problem have two separate types (eg: Foo & Option<Foo>) meaning "definitely a Foo" and "a Foo but it might have no data". Java just has Foo, meaning "a Foo but it might have no data" but no way to represent "definitely a Foo".

There are no comments on this comment yet.