6 ms·
> And yet, an inordinate amount of time isn't forever If it's only guaranteed to terminate after the heat death of the universe, it won't terminate, so I would
by gavinhoward 3y ago
> And yet, an inordinate amount of time isn't forever
If it's only guaranteed to terminate after the heat death of the universe, it won't terminate, so I would call that "forever."
> unlike a program written in an actually Turing complete language, you can use static analysis to detect that kind of thing if only primitive recursion is supported.
And this is exactly why I said that break was necessary.
Sure your static analysis may detect that the loop goes 2^256 times, which would be "forever," and so it returns the answer, "Does not halt."
Ah, but with the break keyword, it still could. In fact, it might always halt rather quickly.
Rule of thumb is that if static analysis can be wrong, it is Turing-complete.