2 ms·
The thing is, Typescript is forced to make compromises because one of their goal is to "type the existing Javascript world". Depending on what you consider an "
by Zababa 5y ago
The thing is, Typescript is forced to make compromises because one of their goal is to "type the existing Javascript world". Depending on what you consider an "advanced" type system, OCaml and the likes (Hindley-Milner types systems) can be considered as advanced (for example compared to Go) but are way easier to understand and use than TS.
I remember that one of the arguments of Rescript (a descendant of OCaml made to be compiled to JS) was that their type system covers most of the cases with little mental overhead, and for the rest you have the usual escape hatches. However TS won in the JS ecosystem and now it's hard to avoid its complexity sometimes.
Complex types systems also tend to attract people that tend to built towers of abstractions and complexity because they can. It's a bit like pattern abuse in the OO land.
- benrbray 5y agoI constantly find myself wishing for something in between Haskell and TS. I want Haskell pattern matching and typeclasses with TypeScript's records / structural types. Haskell's language extensions are nice but not strictly necessary.
- Zababa 5y agoI think Purescript would fit the bill: https://www.purescript.org/ https://www.purescript.org/