On Monday, 29 July 2013 at 11:46:05 UTC, Leandro Motta Barros
This may be off topic, but here I go anyway...
Back in the school days, I joked that the Halting Problem is
easy to solve with a Turing Machine. Since a Turing Machine is a
theoretical device that exists only in our imagination, we can
suppose that it is infinitely fast. So, we simply have to load
program in the machine and run it. If the machine doesn't stop
immediately, it means that it will run forever.
And what does this have to do with DMD?
Well, I kinda have the same feeling when using it. For my
project, I still haven't felt a real need to use a real build
I just dmd *.d. If any measurable time passes without any error
message appearing in the console, I know that my compiled
(and it is the linker that is running now).
BTW, 10kloc is not such a large codebase, but this is with DMD
anyhow, before those improvents ;-)
The halting problem isn't about something taking an infinite
amount of time but about the decidability of it.
For example, we can write a program that will take forever but if
it is known to do so and will never halt, then there is nothing
special about it.
For example, for(;;); in an infinite loop and will never
halt(except when you turn the power off ;) but it's halting state
is completely known.
Halting problems are much more complex.
Even something like
if (random() == 3) break;
is decidable(it will halt after some time).
I would write a program that is undecidable but the margin is too