Re:Algebraic Data Types for C99
by brabel on Thursday May 09, 2024 @02:25PM
(#40311290)
This is trivial to model by making your type `T | null | Missing`.
[ Parent
| on HN ]
Maybe trivial to “work around” but there is a difference, ay?
With this type you would have to check/match an extra case!
The type you use there also takes more memory than Option<T> or Maybe<T>. So it has some other downsides.
Or just using Option since you would have Some<null> or None in that case.