Hacker News new | ask | show | jobs
by tom_mellior 2241 days ago
Yes, but it is the difference to other programming languages.

In C you cannot encode a Turing machine that is executed by the compiler at compile time. In Brainfuck you cannot encode a Turing machine that is executed by the compiler at compile time. In C++ you can encode a Turing machine that is executed by the compiler at compile time.

That is the difference we are discussing here.

2 comments

Yes i now realize that, thanks for explaining further. The original comment was worded in a way that i misunderstood the claim.
>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

No. 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".