3 ms·
I haven't worked too much with Haskell, but I've spent some time with Scala - they have pretty advanced type systems. Typescript can't match them 100%, but it'
by jiaweihli 10y ago
I haven't worked too much with Haskell, but I've spent some time with Scala - they have pretty advanced type systems.
Typescript can't match them 100%, but it's getting there. e.g. It doesn't have type variance, but it does have f-bounded polymorphism (which is unheard of in most mainstream languages).
The language is powerful enough to build your own constructs. I maintain a Typescript library[1] that emulates Scala options/trys/futures.
For day-to-day work, Typescript is a joy to work with. I describe it to others as the child of Scala and Ruby - pretty powerful type system but with a large community.
[1] https://github.com/jiaweihli/monapt https://github.com/jiaweihli/monapt