by Firmwarrior · 3y ago · 0 comments
Well, the problem is rather, that JavaScript is a pretty bad language (nobody claimed otherwise, when it was designed in 10 days), so that using something like TypeScript makes it much better. Unfortunately your browser understands JavaScript, not TypeScript.
That's the immense tragedy of web development: It's a giant pile of excrement, because it's built on several things that were never meant to be what they are used for today.
It's also why I left a long time ago, and never looked back.
For the record, I think Javascript is fine (with some nasty warts), and Typescript is a great addition. The idea that TS is great but JS sucks is silly.
I know it all gets compiled away in JS and all, but Pydantic is surprisingly ergonomic to use and type hints are sort of a suggestion, albeit available at runtime.
Closest I've seen is Zod, but the syntax looks horrendous IMO. Maybe you look past it eventually though.
I left over a decade ago and went back to low level kernel programming.