3 ms·
>C++’s template system is turing complete, which means its type language is too. That lets you move the vast majority of java runtime type errors to compile tim
by coldtea 8y ago
>C++’s template system is turing complete, which means its type language is too. That lets you move the vast majority of java runtime type errors to compile time.
Never heard C++'s templates turing completeness described as some kind of advantage.
- hedora 8y agoGo look at json for modern C++. You write declarative specifications of your data types and it gets the C++ compiler to generate json serializers and deserializers. (Note that C++ templates are a statically typed, lazily evaluates, pure functional language, so many of the advantages of Haskell, etc. can be shoe-horned into C++ types).