News for hackers. Stuff that matters.
Re:Rust severely disappoints me by tatterdemalion on Thursday January 12, 2017 @04:57PM (#13386509)
> I got this a little but not a lot wrong. return 42 is supported but then it isn't clear at all why 42 is necessary.

The reason this is very good is closures, which have the same return semantics as functions, are often a single expression, and are most useful to fit on one line. `.filter(|x| x.foo_bar() < some_other.foo_bar())`. Removing the return statement helps here.

Its a behavior shared with many (but not all) languages that make heavy use of anonymous functions.

Re:Rust severely disappoints me by fjrieiekd on Thursday January 12, 2017 @08:05PM (#13387617)
Swift does support this also, but they limited it so they could also get rid of semicolons entirely.