4 ms·
As the post nicely demonstrates, TypeScript is definitely not OK for compilers (and not surprising at all!) It doesn't even have destructuring pattern matching
by tomp 3y ago
As the post nicely demonstrates, TypeScript is definitely not OK for compilers (and not surprising at all!)
It doesn't even have destructuring pattern matching!
At this point, even Java is better [1].
[1] https://github.com/tomprimozic/caya/blob/master/src/caya/Interpreter.java#L250 https://github.com/tomprimozic/caya/blob/master/src/caya/Int...
- dom96 3y agoPattern matching is definitely not a requirement for a language to be good for writing compilers in.
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- vlakreeh 3y agoWith how powerful the type system is you can implement pattern matching via a library pretty convincingly, https://github.com/gvergnaud/ts-pattern https://github.com/gvergnaud/ts-pattern is definitely the go-to. That being said pattern matching is hardly a requirement for being ok for implementing compilers.