3 ms·
I guess you’re asking about the block part — it’s a minor syntactic convenience and not the main point of the comment. It avoids the word function/lambda or def
by wruza 2y ago
I guess you’re asking about the block part — it’s a minor syntactic convenience and not the main point of the comment. It avoids the word function/lambda or def-block and related syntactic inconvenience like parentheses around and at the end and interference with ASI (when applicable).
- kibwen 2y agoYou're looking for blocks-as-expressions, e.g. the following is valid Rust: let x = { whatever; 5 }; // assigns 5 to x