3 ms·
Some things like conditional types and string template literal types start to get way out into abstract type land that is certainly more advanced than C#'s type
by WorldMaker 6y ago
Some things like conditional types and string template literal types start to get way out into abstract type land that is certainly more advanced than C#'s type system. Typescript is inching closer and closer to the Haskell-ish land of turing complete type systems where the type system itself is nearly it's own meta-programming language with each version.
(A recent example was the "SQL engine" written using string template literal types to type safe "query" an in-memory database. That's quite more advanced than anything C# is capable of, albeit a strange hack and unlikely to be specifically something useful in production anytime soon, though still built out of things that make Typescript useful to some JS projects.)
- seanmcdirmid 6y agoTypescript lacks the goal of soundness, which makes it much easier to introduce powerful features than in Haskell.