2 ms·
The equivalent of "while (true) {}" depends on how you want to reduce your Turing program to the type system. For example, you could translate "the Turning pro
by paulddraper 9y ago
The equivalent of "while (true) {}" depends on how you want to reduce your Turing program to the type system.
For example, you could translate "the Turning program yields 1" as "the types are valid", and anything else (0 or nontermination) as "the types are not valid".
So "while (true) {}" would correspond to invalid types. And a sufficiently smart interpreter/runtime could conclude that "while (true) {}" does not yield 1, just as a sufficiently smart complier could conclude the type constraints are not met.
But no interpreter (and no compiler) would be able to reach a correct conclusion in all cases.
- yoz-y 9y agoI see. I got confused by the fact that for me a program that never ends is still valid, but I understand how this makes no sense for a type system.