From: Juan Zanos Date: 2009-02-18T23:48:01+09:00 Subject: Re: What are your favorite Ruby features? On 18 févr. 09, at 09:07, Robert Dober wrote: > On Wed, Feb 18, 2009 at 2:38 PM, Rick DeNatale > wrote: >> On Tue, Feb 17, 2009 at 2:40 PM, David Masover >> wrote: >> > >> def foo bar > > That is very hard to read indeed, but why? > > def foo( bar ) > > This is not so much better! > We are all totally accustomed to the fact that foos and bars designate > the same kind of thing. > > I therefore think that > > def fact n > > is more readable for most people than > > def n( fact ) > > which is nonsense of course (in the particular context). > > Naming seems more important than params or not params (of course if I > might say?). > > Cheers > Robert > > > -- > There are some people who begin the Zoo at the beginning, called > WAYIN, and walk as quickly as they can past every cage until they get > to the one called WAYOUT, but the nicest people go straight to the > animal they love the most, and stay there. ~ A.A. Milne (from > Winnie-the-Pooh) > Good point. Syntax isn't all there is to readability. But it does have some effect. In this case the parenthesis don't make anything inherently more readable and aren't helpful in resolving the nonsense names. The parenthesis are only meaningful if you already know what they mean. Readability arguments are often tainted by experience with previous languages. And it must be remembered that no programmer is born knowing a previous programming language. If we insist, implicitly or otherwise, that readability means that something looks like 'C' or Java or any other language then we place limits on how much we can simplify syntax. I'd actually say that each example with parenthesis requires a lot more explanation of why they are their, what they mean, what are the syntax rules that govern them, etc. Cheers, Juan