2 ms·
It is a semantic distinction, because "everything is an expression" and "implicit returns" have different semantics. Thinking of them as implicit returns leads
by steveklabnik 7y ago
It is a semantic distinction, because "everything is an expression" and "implicit returns" have different semantics.
Thinking of them as implicit returns leads people to believe they can write code like
fn foo(x: bool) -> i32 {
if x {
5
}
// more code
and then they're confused when this doesn't work.