On Fri, Sep 4, 2015 at 8:57 AM, Peter Lind <peter.e.l...@gmail.com> wrote:
> On 4 September 2015 at 08:44, Pavel Kouřil <pajou...@gmail.com> wrote:
>
> You're arguing that, subjectively, to you - parentheses make things harder
> to read. For others they clarify things.
> It should be obvious to everyone that this particular path of the discussion
> has about as much merit as tabs vs spaces.

Sure, it is subjective - but what isn't?

> That being the case, I would argue for consistency and simplicity. If you
> need parentheses for other variants of this, require parentheses all the way
> through. It will be simpler to learn and trip fewer people up.

Depends how you define simplicity. Because $a ~> $b ~> $c ~> $d is
IMHO more simple than ($a) ~> ((($b) ~> (($c) ~> $d($foo))) - which is
a result of the combination of amendments #2 and #3. I honestly do not
know if I wrote the parenthesis right now or not (probably not),
because there's simply just too many of them.

Sure, parenthesis can help people understand things, but I'd say that
at the same time, too many of them can be a problem as well (as the
fun name for LISP - "lost in stupid parenthesis" - suggests).

> Just think, if whoever constructed the if conditional hadnt thought "hey,
> let's be clever and save some keystrokes by making the curlies optional in
> some cases" we wouldn't have the multitude of bugs and security holes we
> know to exist, we wouldn't have to warn the young'uns against improper use
> of if, we wouldn't have to write codesniffer rules against single line ifs,
> etc, etc.
>
> Any argument to the effect of "let's be clever" or "it'll save some
> keystrokes" is void. Period.

This is not about saving characters, it's about not overcomplicating things.

>
> Regards
> Peter
>

Regards
PK

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to