Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The map-mutable variant in Rust doesn't seem all too complicated to me; but I have the advantage of being used to the iterator+closure syntax which admittedly can look unnecessarily confusing sometimes.

I personally often avoid long chained iterator operations, especially if they involve `for_each()`. Usually they're barely shorter than a for loop but seem to be harder to figure out for the type & ownership checker, leading to annoying issues with less helpful error messages. And just like with pipes in Bash I often run into situations where I wish I had multiple "channels" through which I can pass data, and a loop doesn't have any limitation like that.

Luckily there are multiple neat ways to solve problems in the language.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: