|
|
|
|
|
by Dylan16807
2887 days ago
|
|
> SFINAE, accidentally turing-complete templates Template meta-programming is awful but that particular type of turing completeness isn't a problem at all. Mere arithmetic and some kind of ability to loop gives you that kind of turing completeness. The typical compiler limits looping depth to a couple hundred, and the problem is solved. Such a construct isn't a notably slow use of templates either. It's more trouble to avoid it than to have it. Compare some macros that can't loop and need a bunch of extremely repetitive lines for different sizes. |
|
I need my typechecker be total. And you don't need turing completeness for arithmetic and recursion.