3 ms·
> ADTs C++ is already a very complex beast as it is. ADTs (and pattern matching) make it concise to express many different programming things. But I'd imagin
by rgoulter 3y ago
> ADTs
C++ is already a very complex beast as it is.
ADTs (and pattern matching) make it concise to express many different programming things.
But I'd imagine that adding it to C++ would be horrendous.
- Philpax 3y agoWell, they already did [0]. It's not very fun to use; something that was less miserable would probably see more use. Retrofitting them to a language isn't impossible, either; there are a few languages that have managed to do it by adapting to their ecosystem's mores, like TypeScript and Kotlin. That beings aid, I don't disagree with your general point. C++ is already incredibly complex and impossible to understand as a single individual; I don't think that can be fixed without removing things from the language. My gut feeling is that the future of C++ is not C++, it's cpp2 or Carbon. [0]: https://en.cppreference.com/w/cpp/utility/variant https://en.cppreference.com/w/cpp/utility/variant