4 ms·
> Learn golang or rust instead. Bad take. Learn golang and rust and python. You should use the language which is suited to the task, sometimes that's golang s
by AdamJacobMuller 3y ago
> Learn golang or rust instead.
Bad take. Learn golang and rust and python.
You should use the language which is suited to the task, sometimes that's golang sometimes that's python and sometimes it's rust.
It's impressive that the python team as a whole continues to improve in such big ways after more than 30 years of development. It's more impressive that the python team managed to navigate 2to3 and come out stronger.
- thisismyswamp 3y ago> Learn golang Having to "if err != nil" every single function call is a big put off - imagine having to "try catch" everything in a language like C#!
- jen20 3y agoTwo functions solve this (in Go): func Must(err error) { if err != nil { panic(err) } } func Panic[T any](v T, err error) T { if err != nil { panic(err) } return v }
- AdamJacobMuller 3y agoI love it. It forces me to think about how my programs can fail and what I should do when they fail.
- thisismyswamp 3y agoBeing forced to think about every possible failure state is a sure way to spend a lot of time on not creating value for the end user
- neonsunset 3y agoPython is a bad programming language, but a great scripting one. You use it when you either have to do scripting or need a framework that is only offered in Python (the entirety of ML domain). Otherwise, the only reason to pick it is if you have no choice, you don't want to do a rewrite or you are being held at a gun point. Instead, pick C#/F#, Kotlin/Clojure or Rust depending on the use case.
- AdamJacobMuller 3y agoSure, I somewhat agree with what you're saying about python being good for "scripting" and not "programming" but to me, programming == code writing and scripting == code writing == programming. I definitely agree that libraries can and should drive your language decisions. A 20,000 line golang program might be 10 lines of python because there is a library to do what you need. Similarly a complicated-to-reason-about python program may be made far simpler by using go channels/routines.