Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66116 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26773 invoked from network); 21 Feb 2013 14:49:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2013 14:49:59 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.179 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.179 mail-ob0-f179.google.com Received: from [209.85.214.179] ([209.85.214.179:33487] helo=mail-ob0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/F3-05272-61436215 for ; Thu, 21 Feb 2013 09:49:58 -0500 Received: by mail-ob0-f179.google.com with SMTP id un3so8908968obb.10 for ; Thu, 21 Feb 2013 06:49:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Hz228KJc/TKt7XQz4Q7AcWfIIvNZcSqVDEEUkUfer1c=; b=kz1Zq6LPE38fMfYn5USZGxLx/mLDvbsgKKZf1JIWJ+5NGH31NeEtZBXMjGXPmLRC97 OYmn/Zw+BlRwTu8bDGkbpCDuYW41M0mkhlHuNz3vvcErOs0L/NFA1T9tRDviyNG83R4y FlO8ubF89io+5L/93iLH3O/wiUTaq3FR2M0JM0C03jyhfUEymFDPmWdkhFc5osPOItQR Y9Q59HjgvI8pEI/YaLEhYvSvyKd2CGpbOj8gCcSXxM9sDeAUywOfZkFYSn3sbU40pm+H UG+MCcvyLoJAQ2JR1XRtLG75JcRCZ3p2Vu+blEN6HMswrkB7ydDJh2eZSp3knGu+PCUP AHAA== MIME-Version: 1.0 X-Received: by 10.182.118.42 with SMTP id kj10mr10830731obb.99.1361458195080; Thu, 21 Feb 2013 06:49:55 -0800 (PST) Received: by 10.76.24.234 with HTTP; Thu, 21 Feb 2013 06:49:54 -0800 (PST) In-Reply-To: <14B2EAAC-0B40-44C2-84E8-99B89C7398D0@gmail.com> References: <8490FC41-2696-4948-83A1-3931674183B0@gmail.com> <288800174.20130220052301@cypressintegrated.com> <14B2EAAC-0B40-44C2-84E8-99B89C7398D0@gmail.com> Date: Thu, 21 Feb 2013 07:49:54 -0700 Message-ID: To: David Muir Cc: Lazare Inepologlou , Sanford Whiteman , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [RFC] Short syntax for anonymous functions From: morrison.levi@gmail.com (Levi Morrison) On Thu, Feb 21, 2013 at 4:17 AM, David Muir wrote: > > On 21/02/2013, at 6:12 AM, Lazare Inepologlou wrote: > >> 2013/2/20 Sanford Whiteman >> >>>> It still looks like some random characters bashed together by a monkey >>>> with a keyboard. >>> >>> +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. :) >>> >> >> 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. > Obviously that's up to interpretation; I think the second is better though I don't understand why `==>` is there instead of something simpler.