3 ms·
> TypeScript doesn't even come with ADTs You still can use them [0]. > proper pattern matching [1] is pretty good. [0] https://itnext.io/practical-introduct
by iaml 5y ago
> TypeScript doesn't even come with ADTs
You still can use them [0].
> proper pattern matching
[1] is pretty good.
[0] https://itnext.io/practical-introduction-to-algebraic-datatypes-adts-in-typescript-1cb6952e4c6d https://itnext.io/practical-introduction-to-algebraic-dataty...
[1] https://github.com/gvergnaud/ts-pattern https://github.com/gvergnaud/ts-pattern
- toastal 5y agoThey need to be first-class. Not means the ergonomics aren't great and it won't be the developer default because it requires a library. It's not good enough considering how fundamental these two are in many languages (it's even in Java now)