3 ms·
> Apply functional programming idioms and use immutable data structures if you can. This is what I've tried to do when learning Rust. However, I find it ends u
by joseph 10y ago
> Apply functional programming idioms and use immutable data structures if you can.
This is what I've tried to do when learning Rust. However, I find it ends up more boilerplatey than a language like Haskell. I had to do lots of clone() and iter(), which cluttered up the functional idioms. Maybe I'm doing it wrong though.
- steveklabnik 10y agoRust makes deep copies explicit, whereas those languages don't. So if you program in the exact same style, it will be a bit more verbose; Rust is exposing a cost here. That said, idiomatic Rust does lean a bit more functional than many languages.