3 ms·
Ok can we reduce sudoku to something Turing complete and hence prove TypeScript is Turing complete?
by paradite 2y ago
Ok can we reduce sudoku to something Turing complete and hence prove TypeScript is Turing complete?
- itishappy 2y agoIssue #14833 - TypeScripts Type System is Turing Complete https://github.com/microsoft/TypeScript/issues/14833 https://github.com/microsoft/TypeScript/issues/14833
- brap 2y agoDoes this mean that some types never get resolved? How does the type checker handle that?
- anamexis 2y agoIndeed, the link gives an example of such an infinitely recursive type: type Foo<T extends "true", B> = { "true": Foo<T, Foo<T, B>> }[T]; let f: Foo<"true", {}> = null!; As for how it's handled, it yields the error "Type instantiation is excessively deep and possibly infinite. [2589]" I'm not sure what the max stack depth is, though.
- School-Cotton 2y agoChecking a sudoku board always terminates, so no.