4 ms·
About 4 years into my career I am really really reaching the end of my rope with Python. Type annotations have improved things a bit, but since it's not real,
by skrtskrt 6y ago
About 4 years into my career I am really really reaching the end of my rope with Python.
Type annotations have improved things a bit, but since it's not real, or enforced by anything, every library types things differently & often incorrectly, if at all, and the type annotation system itself still has massive limitations.
That's not to mention the package management ecosystem.
I'm getting into Go and Rust. Go is fine but it would be a million times better if it had proper enums & pattern matching for result & options types. Being able to define a class of errors as an enum in Rust makes handling them so easy.
Rust is really cool, but I know I am barely scratching the surface with it and it would be hard to convince any of the Python shops I have worked in to go to Rust due to the learning curve.
All the Python shops I have worked have eventually started to write some stuff in Go, except the one shop which is just data/PySpark stuff .
- tcbasche 6y agoPutting aside the dreary package management situation with Python (although perhaps Poetry will scratch that itch?) codebases really only shine with comprehensive unit testing, linting, static analysis and a bit of discipline to stop it from degrading. Although perhaps that’s applicable to any large codebase.
- skrtskrt 6y agoI agree. Poetry is good but not good enough to use at work yet. Also - not Poetry’s fault - many Python packages are miserable at listing and versioning their dependencies correctly. Re: everything else, you’re right but it gets really tiring writing tests that are handled by the type system in other languages. Go has this problem too to a certain degree since multiple error subtypes can’t be expressed as an enum. Just errors.Is and errors.As everywhere.