News for hackers. Stuff that matters.
Re:Some notes on Rust by burntsushi on Sunday February 01, 2015 @02:36PM (#8981311)
> So I should use `return` except when I shouldn't? This is the cognitive overhead problem I'm talking about.

No. Use `return` only when you must. If you want an early return in a function, then you need to use `return`. If you don't need an early return, then don't use `return` at all.

I can't remember if this was ever a cognitive load for me personally. I don't think it was.

Re:Some notes on Rust by falcolas on Sunday February 01, 2015 @03:31PM (#8981539)
> I can't remember if this was ever a cognitive load for me personally. I don't think it was.

Well, to be fair, it sounds like you're used to semicolons having special meaning (aside from separating expressions) from a previous language.

> As for `;`, it's just like Standard ML. `;` is for sequencing expressions. I love it.

It's worth remembering that most users of C, C++, Ruby, Java, Python, or whathaveyou are not used to the semicolon having special meaning. Since Rust appears to be primarily aimed at replacing C++, this is going to be a significant change which will likely trip people up for awhile.

Re:Some notes on Rust by agrover on Monday February 02, 2015 @01:29AM (#8982973)
I'm a C/Python person, and it did take a question on irc for me to get my head around how Rust does it, but now it seems so natural that it's a little irksome to look at some of my Python code :)
Re:Some notes on Rust by steveklabnik on Monday February 02, 2015 @02:21AM (#8983081)
Ruby also does this, so if you want that natural feel in your dynamically typed language... ;)