|
|
|
|
|
by steveklabnik
2850 days ago
|
|
It does seem strange if you think of it as “return the last evaluated thing from the function.” But that’s not the semantic; the semantic is “everything is an expression and expressions evaluate to a value.” Removing this behavior would make these languages less consistent. (And yes, in both Ruby and Rust not literally everything is an expression, but almost everything is.) |
|