HNHacker News
TopNewBestAskShowJobs

jjdisn

1 karma · joined May 28, 2024

submissionscomments
jjdisn··on Show HN: Sum (algebraic) types for C in one 100 line header
Honest question: what's wrong with std::variant? I'm quite fond of using it.

Sure it has trade offs like being empty by exception, but that's necessary if you don't want it to allocate.

Also, pattern matching would be nice instead of std::get with visitor, but that's more of a language issue than an std::variant issue