top | item 45049157

(no title)

frabcus | 6 months ago

It doesn't solve all the problems at library boundaries, but pyright is fairly new and vastly vastly better than mypy.

With it Python feels about at the type safety level of Typescript - not as good as a language that had types the whole time, but much much better than nothing if enforced with strict rules in CI.

discuss

order

sfn42|6 months ago

On the other hand, TS is terrible. The type system is ridiculously complex in order to support all the weird stuff you can do in JS, I frequently get insane error messages with 20+ lines of archaic type gibberish and when I figure out the solution it's usually very clear that the sparse information i managed to glean from reading the error message was nothing but a distraction.

I don't like JS but after having used TS intermittently for a number of years I'm starting to think JS is the better option. At least there I don't get tricked by typed objects being something other than what they claim to be, or waste time trying to declare the right types for some code that would work perfectly without TS.

TS is too much work for too little reward. I'd rather just make simple frontends with as little logic as possible and do the real programming in a real programming language on the backend.