5 ms·
Typescript feels like it's own language. Whereas python types are just optional extra information you can add (more like Flow does), and they are rather verbos
by Humphrey 7y ago
Typescript feels like it's own language. Whereas python types are just optional extra information you can add (more like Flow does), and they are rather verbose and clunky compared to Typescript
- pas 7y agoYou can try and take some old JS lib and annotate it in TS. It'll work. It'll be very clunky, and full of any/unknown. There's a reason why strong static typeable code looks the way it looks (basically functional programming). You can type a monad chain, because it's a container type for arbitrary types interacting, but you can't easily type a switch nested in a for loop that uses a queue to walk a tree. Of course the flip side is that to walk a tree functionally you need recursion schemas, and they are ugly/complex.