8 ms·
I don't think that's true. TypeScript's type system is very advanced, and has most of the features you need for type-safe development if you use strict mode (wh
by frankpf 7y ago
I don't think that's true. TypeScript's type system is very advanced, and has most of the features you need for type-safe development if you use strict mode (which is the default for projects created with `tsc --init`). It has ADTs, null safety, exhaustiveness checking and the LSP tooling is better than any other language I've tried. The biggest feature that's missing from Scala is HKTs, and even those can be faked in TS.
- yawaramin 7y agoIt doesn't have soundness.
- invaliduser 7y agoThis is by design, and rather well explained in the typescript documentation: the type system is based on structural subtyping, which seems like a good tradeoff to me (but of course, as any design choice, not everyone should agree, and it's fine).
- yawaramin 7y agoStructural subtyping doesn't imply lack of soundness, OCaml object types have structural subtyping too and OCaml is sound.
- verttii 7y agoI'd be hard pressed to say ADTs are first class citizens in Typescript. If anything, seems more like a hack over some interface primitives to me. I miss having a solid advanced type system like in Haskell when using something like Typescript or Dart. Typescript feels mostly like Microsoft's attempt on converting Javascript to align more with C# to me.