3 ms·
Us Node folks adapted typescript because we wanted static compiled types. I wish TS had more of a runtime. The only thing I'm jealous of with regards to python
by com2kid 5mo ago
Us Node folks adapted typescript because we wanted static compiled types.
I wish TS had more of a runtime. The only thing I'm jealous of with regards to python is how seamlessly you can do JSON schema enforcement on HTTP endpoints. The Zod hoops are a constant source of irritation that only exists because the TS team is dogmatic.
- tptacek 5mo agoI think Typescript is a perfectly cromulent language. I don't know it well but would seriously consider it for any problem that had a shape that admitted a dynamic language. There's a lot to be said for using dynamic languages, too!
- com2kid 5mo agoEvery non-runtime language is dynamic after being compiled to x64 machine code! It is illusions and lies all the way down the instant the compiler finishes its job.
- satvikpendem 4mo agoCheck out Perry the TypeScript compiler to native code
- Recursing 4mo agoexpress-zod-api works well for me https://github.com/RobinTail/express-zod-api https://github.com/RobinTail/express-zod-api I'd say about as well as anything Python
- com2kid 4mo agoTypescript supporting runtime usage of types instead of making me define them in Zod first would be 100x better. Or at least support a standard for code transform plugins.
- ngrilly 4mo ago> The only thing I'm jealous of with regards to python is how seamlessly you can do JSON schema enforcement on HTTP endpoints. Yes, it is much easier in Python because type annotations are reflected at runtime.