←back to thread

517 points bkolobara | 2 comments | | HN request time: 0.001s | 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. IshKebab ◴[] No.45050186[source]
I would say it's more like 50%. Rust benefits not just from static typing but also a much stronger type system with things like enums, pattern matching, marker traits, ownership, mutability, etc. You don't get any of that with Pyright.

(But if you must use Python then definitely use Pyright.)

replies(1): >>45085347 #
2. arthur-st ◴[] No.45085347[source]
To be fair, you do get enums and pattern matching from base language.