News for hackers. Stuff that matters.
Re:TypeScripts Type System Is Turing Complete by paulddraper on Wednesday August 02, 2017 @11:38PM (#14916789)
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.

Re:TypeScripts Type System Is Turing Complete by yoz-y on Thursday August 03, 2017 @06:18AM (#14918331)
I 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.