Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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).


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 :-).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: