Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88045 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95372 invoked from network); 4 Sep 2015 07:43:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Sep 2015 07:43:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=pajousek@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pajousek@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.179 as permitted sender) X-PHP-List-Original-Sender: pajousek@gmail.com X-Host-Fingerprint: 209.85.213.179 mail-ig0-f179.google.com Received: from [209.85.213.179] ([209.85.213.179:35840] helo=mail-ig0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/44-60419-3BB49E55 for ; Fri, 04 Sep 2015 03:43:49 -0400 Received: by igcrk20 with SMTP id rk20so6712967igc.1 for ; Fri, 04 Sep 2015 00:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=I7LdtczU8pO3iHSheuwJU1QrFNQLGGlNBUBwartmM8A=; b=VOrBtXv4XWqiz3YhsWJrH6kddO6WoSjkM4VqiTw7O8QzRB7hlBtCYNBnd46CQF80oV 5KzDfpFtK2JPU0gNA36zR/1vJKznSL1zpYduOw6bUkzA26Y5thfBTMpWjE5pf9Qy8E9b HWj7x9OHR/8aJomyqCXs0Fy13Gkq2n/stLYq0CwWdyz1vos0I64bRztKx/lrMoOdCax7 6Ys4wLg+thfWIcL5Q8VJuhkDvCpmHxwwXJgezKlEBbhGrJI4Zn5Fe74mgczjpPHfo5fD PHfxB5hb+uh8xlr6vE5NACEzpB82S2akTowuSFvkAXSfB8OE2JYzaag5Fez0AUl31dv1 m4lw== MIME-Version: 1.0 X-Received: by 10.50.2.39 with SMTP id 7mr4467163igr.86.1441352624571; Fri, 04 Sep 2015 00:43:44 -0700 (PDT) Received: by 10.107.24.194 with HTTP; Fri, 4 Sep 2015 00:43:44 -0700 (PDT) In-Reply-To: References: <55E77CA9.7050609@gmail.com> <55E81959.6040305@gmail.com> Date: Fri, 4 Sep 2015 09:43:44 +0200 Message-ID: To: Peter Lind Cc: Rowan Collins , PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] [Discussion] Short Closures From: pajousek@gmail.com (=?UTF-8?Q?Pavel_Kou=C5=99il?=) On Fri, Sep 4, 2015 at 8:57 AM, Peter Lind wrote: > On 4 September 2015 at 08:44, Pavel Kou=C5=99il wrot= e: > > You're arguing that, subjectively, to you - parentheses make things harde= r > to read. For others they clarify things. > It should be obvious to everyone that this particular path of the discuss= ion > 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 i= n > 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 us= e > of if, we wouldn't have to write codesniffer rules against single line if= s, > 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