On 18 f=E9vr. 09, at 18:43, Bill Kelly wrote:

>
> From: "James Britt" <james.britt / gmail.com>
>>
>> I have my own preference, and have so far found arguments to the =20
>> contrary unsatisfying because they are usually based on previous =20
>> use of parens in other languages.    (The most interesting =20
>> suggestion I've heard is to use the parens to indicate if the =20
>> return value of the method is useful or not.  That is, whether a  =20
>> method is intended as a statement or an expression.)
>> I'm truly puzzled when people get their back up at the suggestion =20
>> that their style preference is based on bias obtained from =20
>> previous exposure to other language, conscious or not.  I don't =20
>> think too many people are deliberately thinking, "I want to make =20
>> this look like [C|Java|Perl|PHP]", but surely there is *some* bias =20=

>> based on experience.
>
> I agree there is some bias based on experience, as I went through
> a phase about 18 years ago as a C programmer, deliberately
> memorizing the operator precedence table and taking small delight
> in being able to write expressions devoid of any parens except
> those strictly necessary to the parser.
>
> Note, also, that my first language was Forth, which I programmed
> in for seven years--initially as a hobbyist, then professionally--
> before I learned C.
>
> Forth doesn't need parens for anything... ( they're comment delims. )
>
> However, I'm not sure my Forth experience played a role in my
> temporary dalliance with extreme paren minimalism in C.  At the
> time, I felt memorizing the operator precedence table and making
> use of that knowledge by minimizing use of parens was sort of a
> natural course to take for someone intent on mastering the
> language.
>
> Eventually one of my co-workers told me he had trouble reading
> my code.  Initially my (private) reaction was, this guy isn't
> serious about his craft!  He really ought to learn the language.
>
> Thankfully I got past that phase eventually.
>
> My current bias based on experience is that when reading code,
> my brain does frequently prefer more parens than are strictly
> necessary to the parser.

One of the things that confuses this discussion is that some people =20
are talking about the use of parentheses with regard to operator =20
precedence rules and others are discussing far more arbitrary and =20
questionable usages such as in declaring and calling functions.   I =20
think it's telling that such a seemingly minor complexity is cause =20
for confusion.

I doubt you'll get much disagreement that operator precedence rules =20
for c (or Ruby) are complex enough that there are cases where the use =20=

of parentheses simplifies reading.   That doesn't seem to be =20
something anyone is questioning.

Cheers,
Juan=