←back to thread

517 points bkolobara | 4 comments | | HN request time: 0s | source
Show context
koakuma-chan ◴[] No.45041723[source]
I encourage every one to at least stop writing code in Python.
replies(5): >>45041794 #>>45041941 #>>45042073 #>>45043031 #>>45049992 #
veber-alex ◴[] No.45041941[source]
Here is some actual useful advice:

Use a type checker! Pyright can get you like 80% of Rust's type safety.

replies(7): >>45042031 #>>45042063 #>>45042147 #>>45042269 #>>45043223 #>>45047269 #>>45050186 #
1. munificent ◴[] No.45043223[source]
> 80% of Rust's type safety.

Sort of like closing 80% of a submarine's hatches and then diving.

replies(1): >>45047885 #
2. mixmastamyk ◴[] No.45047885[source]
Very few bugs are life-threatening.
replies(2): >>45049301 #>>45054156 #
3. pkolaczk ◴[] No.45049301[source]
But they decrease productivity. And I seriously think many teams don’t track the time sunk for fixing bugs / defects properly and they overestimate their productivity, especially the initial productivity boost from not having to think about types.
4. munificent ◴[] No.45054156[source]
The problem with an unsound type system like TypeScript's is that once a value of an unexpected type has snuck through a soundness hole, it can end up anywhere in the program, even in code that seems fully safe.

(Also, it means that you don't get any performance benefit from static typing your program.)