4 ms·
It's neat that this will eventually improve some python code, but at the end of the day, it's still a badly typed language, which will still be slower and less
by purpleidea 3y ago
It's neat that this will eventually improve some python code, but at the end of the day, it's still a badly typed language, which will still be slower and less safe than more modern languages.
Learn golang or rust instead. Impressive that they are managing this though!
- Cacti 3y agobut Python has my libraries, and go and rust do not. >> 99% of my compute is offloaded to compiled BLAS or CUDA. types are enough. and memory and type safety are not terribly relevant for my use cases.
- alfalfasprout 3y agoBad take. One doesn't just migrate massive ecosystems to "go or rust". Python, like it or not, is the lingua franca of ML/AI and science. Worse, as a user of Go/Rust it's very disingenuous to expect the same kind of iteration ability in those languages as you get in Python. With tools like pyright now + the work on nogil everyone benefits from this using Python.
- takeda 3y agoRust, sure, but typing in golang isn't superior to python's type annotations. Also Rust became a quite popular tool for python extensions, where you can offload performance to rust and business logic to python.
- jen20 3y ago> typing in golang isn't superior to python's type annotations. Yes it is, in every way. When the first job of choosing to use types is choosing which of the five or so type checkers, each deficient in their own way and incapable of dealing with the poor idioms the language encourages to proliferate, you know you're on the wrong path.
- 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.