Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66102 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92223 invoked from network); 21 Feb 2013 11:17:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2013 11:17:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=davidkmuir@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=davidkmuir@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.47 as permitted sender) X-PHP-List-Original-Sender: davidkmuir@gmail.com X-Host-Fingerprint: 209.85.160.47 mail-pb0-f47.google.com Received: from [209.85.160.47] ([209.85.160.47:46012] helo=mail-pb0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/4E-03224-C5206215 for ; Thu, 21 Feb 2013 06:17:49 -0500 Received: by mail-pb0-f47.google.com with SMTP id rp2so3465115pbb.6 for ; Thu, 21 Feb 2013 03:17:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date :to; bh=/K+NSm9YFLS9jLgY1CavQ7Fc8e5YS0FPIE9J8B2r6/M=; b=ANZdRFhrspIaHVI1KqRjzItRKXJ+nbDjpntmvnDTpcPsr5O9NBRsgKcGJWGqDlJH+F agfAEn4VulxOjugzGRyky+h6h+liusKbcLy1/ROAIsDddaagdh+A4Tlb3bVIOJFeZc3f WU6K4pguiiLocu+aepRX0ieWx9ghDzaKaDcfIyK8jvPlxy9W4Xvt0pnrbyJkjlGkWfVs DhX+sizT3+Y1AqEicro/DrRwtPK777biatibE1fhSd1dsJwoX3dNeagjO96Qv6ZNtcgm hZOf9Iom0s5LwUf8YcOaMiShsDJaikWnGOEQHs5EFmpIPpUCi+4BX+P90Ie4RphxIPNs ZzZg== X-Received: by 10.68.231.164 with SMTP id th4mr7518971pbc.198.1361445465890; Thu, 21 Feb 2013 03:17:45 -0800 (PST) Received: from [192.168.0.5] (115-64-165-88.static.tpgi.com.au. [115.64.165.88]) by mx.google.com with ESMTPS id rd1sm25046592pbc.19.2013.02.21.03.17.43 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Feb 2013 03:17:45 -0800 (PST) References: <8490FC41-2696-4948-83A1-3931674183B0@gmail.com> <288800174.20130220052301@cypressintegrated.com> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <14B2EAAC-0B40-44C2-84E8-99B89C7398D0@gmail.com> Cc: Sanford Whiteman , "internals@lists.php.net" X-Mailer: iPhone Mail (10B141) Date: Thu, 21 Feb 2013 22:17:41 +1100 To: Lazare Inepologlou Subject: Re: [PHP-DEV] [RFC] Short syntax for anonymous functions From: davidkmuir@gmail.com (David Muir) On 21/02/2013, at 6:12 AM, Lazare Inepologlou wrote: > 2013/2/20 Sanford Whiteman >=20 >>> It still looks like some random characters bashed together by a monkey >>> with a keyboard. >>=20 >> +1, I am a fiend for ternary expressions and crazy one-liners, but >> this makes me want to go back and unroll everything I've ever done >> into readable code. :) >>=20 >> -- S. >=20 >=20 > Long code is not always equivalent to readable code. A shorter syntax coul= d > improve readability in *some* cases. >=20 > Long: > $users->OrderBy( function( $x ){ return $x->Surname; } ); >=20 > Short: > $users->OrderBy( $x =3D=3D> $x->Surname ); >=20 >=20 >=20 > Lazare INEPOLOGLOU > Ing=C3=A9nieur Logiciel I think your example proves the opposite. The fist example was much easier t= o read and understand than the second. Cheers, David=