4 ms·
>In C you cannot encode a Turing machine that is executed by the compiler at compile time. But you can get quite close with macros
by benibela 7y ago
>In C you cannot encode a Turing machine that is executed by the compiler at compile time.
But you can get quite close with macros
- tom_mellior 7y agoNo. You would need the ability to write unbounded loops or unbounded recursion. You don't have that with the C preprocessor. Yes, you can do a lot with the C preprocessor. You can also do a lot in languages that only have bounded loops and are therefore not Turing complete. You can either express nonterminating computations (Turing completeness), or you can't (still powerful, but dramatically less poweful). This question is binary. There is no fuzziness, there is no approximation, there is no "quite close".