4 ms·
Turns out 99% of the time you don't need to parse terabytes or have μs-response times. Meaning you should be programming just about 99% of your time in Python.
by amelius 3y ago
Turns out 99% of the time you don't need to parse terabytes or have μs-response times. Meaning you should be programming just about 99% of your time in Python.
The Rust memory management puzzles are not really complicated. They just get in the way.
> they don't have basic language tools like proper sum types or traits that get things done
Sum types and traits are not getting things done.
- pkolaczk 3y ago> Meaning you should be programming just about 99% of your time in Python. No, not me, because I’m less productive in Python than in Rust, assuming the same level of final product quality, even excluding runtime performance. > Turns out 99% of the time you don't need to parse terabytes or have μs-response times. Performance is not the primary reason to use Rust. It has way more to offer than performance.
- buddhu 3y ago> Performance is not the primary reason to use Rust. It has way more to offer than performance. So much this. I've been doing mostly Scala (and some Haskell) for the last 10 years, and now I'm really enjoying Rust precisely because of its language features. Performance is just a (really) nice bonus. Other bonuses include simple deployments (single binaries versus massive JVM and fat jars), low memory footprint, simple builds that just work (Cargo is an absolute joy), great concurrency, great ecosystem, etc. etc.
- aldanor 3y ago> 99% of the time 99% of whose time? Where does this estimate come from? Definitely not my case, and definitely not the case for lots of programmers I know and/or work with. Python has its own place (for example, in DS/ML) and while I use it myself on daily basis for what's it's best at, statements like "you should be programming just about 99% of your time in Python" make no sense at best. And, note, it's not only about speed/performance; after writing lots of Rust (or even F#), it's hard to get back to Python because of missing expressiveness and basic language tooling. Finally, speaking of Python (CPython in particular), part of why it's so attractive is all the fast binary extensions libraries written for it... in C++/Rust, not Python. > Sum types and traits are not getting things done. Disagreed, sum types are exactly what gets things done, regardless of language performance and other features. This kind of logic exists everywhere. That's why languages with proper (or even semi-proper) sum types like Rust, F# are a lot easier to express 'business logic' in. And e.g. that's exactly why serialization/deserialization can get so weird in Python where values can be of multiple types and you have to invent crutches to work around that, to simulate sum types in this way or another.
- Ringz 3y agoSince 3.10 python has a „semi proper sum type tool belt“ with PEP 634s pattern matching, typing.Union and the | operator. It requires a different approach and it’s still not as seamless or enforce type safety as strictly at compile time compared to languages like Rust or F# but it’s doable and usable.