3 ms·
> There is literally a ton more you have to write and do for the same thing in Rust. This is not true. Rust and python are about equivalent. Python is difficul
by anon291 4y ago
> There is literally a ton more you have to write and do for the same thing in Rust.
This is not true. Rust and python are about equivalent. Python is difficult to understand because the vast majority of library documentation is simply lists of examples, without any unifying theory. Languages like Rust and Haskell offer much more comprehensive documentation with obvious ways to fit things together based on a well-understood and rigidly specified compositional specification (types).
- jasmer 4y agoWith rust you have to specify type, usually a container/reference type, and annotate lifetimes of everything you pass around. You literally do none of that in Python. You don't even declare variables. They are totally on the opposite ends of 'strictness'.
- shpongled 4y agoFor rapid prototyping I (who you originally replied to) completely avoid lifetimes. If you think you have to "annotate lifetimes of everything you pass around", you should probably revisit Rust. This is simply not true. I find type annotations to be a major benefit while prototyping - I know exactly what everything is, and can quickly refactor anything. The ability to use serde to deserialize/serialize into Rust structs is another huge benefit. Chaining iterators, collections, etc removes a lot of the boilerplate that I find myself doing in python. I've also been using Rust as my primary programming language for 5+ years now, so I am definitely "in the zone"