• expr@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    2 天前

    Umm, there are plenty of languages with a stronger, more expressive type system than Typescript. Like Haskell. And there are languages with an even stronger type system than Haskell (dependently-typed programming languages like Idris). Typescript, while having some small innovations and certainly an improvement over the rather sorry state of OOP type systems, is fairly low on the totem pole as far as type systems go. Also, Typescript’s type system is famously not sound.

    There’s a ton of stuff Typescript simply can’t do. Higher-kinded types, GADTs (type narrowing gives you a little bit of their functionality kinda, but misses a lot of stuff), etc… Not to mention that it has a fairly lackluster type inference system.