3 ms·
C++ templates are also Turing complete.
by computerex 9y ago
C++ templates are also Turing complete.
- ygra 9y agoI think most people knowing C++ know that. But since then we've tried to avoid the same complexity in most newer languages. Thus, the fact that TypeScript, Java, and C# all have Turing-completeness more or less by accident in their type systems may be surprising. (Granted, template metaprogramming was also more an accidental discovery than a design goal of C++, but it's been around for a while longer.)