logoalt Hacker News

ziml77yesterday at 12:50 AM1 replyview on HN

Blocks being expressions is one of the features of the Rust language I really love (and yes I know it's not something Rust invented, but it's still not in many other popular languages).

That last example is probably my biggest use of it because I hate having variables being unnecessarily mutable.


Replies

ghosty141yesterday at 1:07 AM

In my opinion it's the 'correct' design, I don't see any advantage from not doing this.