Re:Some notes on Rust
by Gurkenmaster on Monday February 02, 2015 @08:04AM
(#8983947)
>The cognitive overhead of having the value of a function be the last expression in it is incredibly minor; lots of languages have this feature.
This can cause performance problems in Coffescript because for loops are also expressions.
The cognitive overhead of having the value of a function be the last expression in it is incredibly minor; lots of languages have this feature. Even JavaScript and C# have this with their arrow functions.
> …is an error.
The only time you get an error is if you tried to do something that you couldn't do in C++ at all (returning a value without typing return). I don't see how that would confuse C++ programmers. C++ programmers who write Rust using explicit returns everywhere will have their programs work exactly as they expect.