4 ms·
I disagree. Whenever there is a null pointer in the API, you could (and probably should) be using a sum type instead. Sum types are not novel (Standard ML had
by whyever 4y ago
I disagree. Whenever there is a null pointer in the API, you could (and probably should) be using a sum type instead.
Sum types are not novel (Standard ML had them 40 years ago), but I think they are indeed a game changer.
- blub 4y agoYou’ve described std::optional, a special case of std::variant.