Parentheses

Yukihiro Matsumoto wrote:

I dislike ambiguity.

Me too. But I still like to drop parentheses for some cases.
Omitting parentheses does not always introduce ambiguity.

True enough. Maybe I’ve just been conditioned this way, but I have
found that the cases where that doesn’t happen to not be worth the
inconsistency [when writing my own code].

···

Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

Do you use parens for ‘puts’?

Gavin

···

On Thursday, October 16, 2003, 5:31:55 AM, Michael wrote:

Yukihiro Matsumoto wrote:

I dislike ambiguity.

Me too. But I still like to drop parentheses for some cases.
Omitting parentheses does not always introduce ambiguity.

True enough. Maybe I’ve just been conditioned this way, but I have
found that the cases where that doesn’t happen to not be worth the
inconsistency [when writing my own code].

True enough. Maybe I’ve just been conditioned this way, but I have
found that the cases where that doesn’t happen to not be worth the
inconsistency [when writing my own code].

Do you use parens for ‘puts’?

Gavin

I have. Generally I don’t. I don’t claim perfection, only that I
/generally/ use parens and I dislike poetry mode. Some claim it reduces
noise, to me it is overly ambiguous and reduces the rate at which I am
able to read and write code.

Gavin Sinclair wrote:

···

On Thursday, October 16, 2003, 5:31:55 AM, Michael wrote:

Do you use parens for ‘puts’?

Gavin

I frequently do. It’s nice to not need to, but usually I include them.
OTOH, I’ve been writing code where parens around arguments were required
for multi-decades. But it makes it easier to figure out what the
interpreter will decide to do. Actually, in most languages I will use
parens as opposed to remembering the operator precedence hierarchy, even
among simple arithmetic operations. Because it’s easier.

Since I started the question I might as well add my 2 cents in.

I prefer the use of parenthesis’s in most cases because it increases the
readability of the code for me. I believe more in refactoring code then
write once, read never code. Although in certain statements in Ruby
I do omit them. These are typically the puts and the print statement.

Just my 2 cents,

-Zach