Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66183 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11267 invoked from network); 25 Feb 2013 12:17:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Feb 2013 12:17:55 -0000 Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 67.200.53.250 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 67.200.53.250 mail.zerocue.com Received: from [67.200.53.250] ([67.200.53.250:57840] helo=mail.zerocue.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/D4-10787-F665B215 for ; Mon, 25 Feb 2013 07:17:54 -0500 Received: from [172.17.0.122] (cpe-70-112-216-188.austin.res.rr.com [70.112.216.188]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.zerocue.com (Postfix) with ESMTPSA id 4E9CA120379; Mon, 25 Feb 2013 06:17:48 -0600 (CST) Message-ID: <512B5668.2060508@zerocue.com> Date: Mon, 25 Feb 2013 06:17:44 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: David Muir CC: Lazare Inepologlou , Sanford Whiteman , "internals@lists.php.net" References: <8490FC41-2696-4948-83A1-3931674183B0@gmail.com> <288800174.20130220052301@cypressintegrated.com> <14B2EAAC-0B40-44C2-84E8-99B89C7398D0@gmail.com> In-Reply-To: <14B2EAAC-0B40-44C2-84E8-99B89C7398D0@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Short syntax for anonymous functions From: cpriest@zerocue.com (Clint Priest) On 2/21/2013 5:17 AM, David Muir wrote: > On 21/02/2013, at 6:12 AM, Lazare Inepologlou wrote: > >> >> Long code is not always equivalent to readable code. A shorter syntax could >> improve readability in *some* cases. >> >> Long: >> $users->OrderBy( function( $x ){ return $x->Surname; } ); >> >> Short: >> $users->OrderBy( $x ==> $x->Surname ); >> > I think your example proves the opposite. The fist example was much easier to read and understand than the second. That all depends on how many languages you're versed in, the short syntax above is common in many modern languages and has no clarity issues for me. -- -Clint