News for hackers. Stuff that matters.
Re:We need less powerful languages (2015) by anon291 on Thursday February 02, 2023 @12:11AM (#34622336)
> 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).

Re:We need less powerful languages (2015) by jasmer on Thursday February 02, 2023 @02:55AM (#34623556)
With 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'.
Re:We need less powerful languages (2015) by shpongled on Thursday February 02, 2023 @12:15PM (#34629740)
For 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"