--0016364580001a984b0463203a06 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Feb 17, 2009 at 9:44 AM, Juan Zanos <juan_zanos / talkhouse.com>wrote: > > On 17 fñ×r. 09, at 01:16, David Masover wrote: > >> I like Ruby's relaxed syntax. I like letting things like parentheses be >> implied, leading to interesting, emergent phenomena like hashes as named >> arguments. (Not that I would complain if the language implemented named >> arguments -- even better if I don't have to use them as a hash -- so long as >> I can if I need to.) >> >> I like the ability to create good-looking DSLs, but that's similar to the >> above. >> > > It's possible that without the humble feature of optional parentheses Rake > would never have been invented and I might never have been compelled to take > a serious look at Ruby. Since then I've often wondered why parentheses are > still so heavily used in most Ruby code even when they offer no compelling > utility for most uses. In contrast, omitting unnecessary semicolons seems > almost universal. I suppose parentheses are more habit forming for some > reason. IMHO, coding Ruby without parentheses is a particular kind of spice. Whether you should use a particular spice depends on what you are cooking. The parentheses free style works well for certain internal DSLs like Rake or ActiveRecord association declarations, since they make run-time executed expressions feel declarative. 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. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale --0016364580001a984b0463203a06--