Comment

Comment by nondave

The post raises some good points, but I nonetheless think that C++ is a better language for having std::variant. It can result in some very clear, expressive code, despite the boilerplate and dabbling with more advanced language features that it necessitates.

Indeed, from the article: "In spite of all of this, I’ll be busy encouraging my coworkers to use variant if anybody needs me. Sum types are such a useful concept that they’re worth the pain[...]"

parent nondave 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton