Hacker News new | ask | show | jobs
by tredontho 4342 days ago
We use a bit of a dated version of Gosu where I work (something I never thought I'd get to claim on HN...), but I believe that curly braces are perfectly fine to use, and actually required if you have a multi-statement block (essentially starting to look like anonymous functions in Javascript).
1 comments

Exactly if you want to return just an expression you can avoid them, otherwise if you use statements in the body of the lambda you need curly braces.
OK, thank you both for the explanation. That does sound sane :-).