2 ms·
It is correct to note that C++ lacks some core language features that many newer languages have, tailored to more convenient and, often, safer use of slippery s
by ncmncm 7y ago
It is correct to note that C++ lacks some core language features that many newer languages have, tailored to more convenient and, often, safer use of slippery sum types. Sum types are a step away from lexical typing, and without that support add risk that strong typing was invented to contain.
There is an active project to have a powerful pattern-matching primitive ready in time to adopt into C++23. In the meantime, C++17 supports "structured bindings" that are often helpful.