4 ms·
Also, semicolons in Rust have special semantics. In Rust, semicolons are delimiters rather than terminators, and function similar to how comma operators work in
by chankyin 7y ago
Also, semicolons in Rust have special semantics. In Rust, semicolons are delimiters rather than terminators, and function similar to how comma operators work in C++ (see https://en.cppreference.com/w/cpp/language/operator_other https://en.cppreference.com/w/cpp/language/operator_other). While some may not like the implicit return behaviour in Rust, I think it has a genuine idiomatic meaning in Rust that cannot be easily replaced. Ending a function with a semicolon differentiates returning the last value from returning void (i.e. the empty tuple), so it does not seem like a good idea. (This is a proof of concept anyway it's not like I'm introducing a new language)