Re:Renee, the friendly rack-based framework
by rue on Saturday October 15, 2011 @06:46AM
(#3114581)
Most “rules” about {…} vs. do…end are nonsense. I tend to use {…} unless I can't be bothered to put parens around the arguments.
[ Parent
| on HN ]
Re:Renee, the friendly rack-based framework
by ryeguy on Saturday October 15, 2011 @12:40PM
(#3115123)
They're nonsense in that they are without ryhme or reason, but you should be following the community standard (curlies for one liners, do/end for everything else).
I'd honestly pass on an open source project not following the generally agreed upon ruby standard.
Re:Renee, the friendly rack-based framework
by seanp2k2 on Saturday October 15, 2011 @01:39PM
(#3115292)
>"They're nonsense in that they are without ryhme or reason, but you should be following the community standard (curlies for one liners, do/end for everything else)."
That's my reasoning too. At first, I thought it was more readable (read: familiar) to use curly braces, but now I stick with do...end for blocks >1 line. Sometimes it's helpful for breaking up complex nested map() blocks as well.