From: Florian Gilcher Date: 2009-02-18T02:31:35+09:00 Subject: Re: What are your favorite Ruby features? On Feb 17, 2009, at 5:59 PM, Rick DeNatale wrote: > On Tue, Feb 17, 2009 at 9:44 AM, Juan Zanos > wrote: > > > IMHO, coding Ruby without parentheses is a particular kind of spice. > Whether you should use a particular spice depends on what you are > cooking. > > On the other hand, I've always found leaving out parentheses in Ruby > code, > "just because you can" to tend to look far stranger to my eye than > putting > them in. In fact, sometimes when reading code without them I find > myself > having to read very slowly in order to figure out just how Ruby is > parsing > what I'm reading. I like to switch on situation. Usually, my rule of thumb is: Descriptive code without braces, algorithmic code with braces. === has_many :foobars #vs. has_many(:foobars) === (really, the braces bring no gain) and === foo(bar(batz)) #vs. foo bar(batz) === (the omission kills readability) Btw., my favourite feature about Ruby is its ability to mix descriptive code and algorithmic code very well. Regards, Florian -- Florian Gilcher smtp: flo@andersground.net jabber: Skade@jabber.ccc.de gpg: 533148E2