3 ms·
The halting problem, basically. It's possible for something constructed in the type system (not the program that's being typed, like a type declaration) to recu
by cwyers 9y ago
The halting problem, basically. It's possible for something constructed in the type system (not the program that's being typed, like a type declaration) to recurse infinitely and never stop running until terminated.
That said, there's some contention in that thread over whether or not Turing completeness has been demonstrated.
- amenghra 9y agoThat can be solved by setting a reasonable upper bound on how many types can be nested. In general, having a turing complete type system isn't a major issue, many languages have that property.
- Gehinnn 9y agoThis is how the TypeScript team fixed this issue: https://github.com/Microsoft/TypeScript/pull/15011 https://github.com/Microsoft/TypeScript/pull/15011