Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65980 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13798 invoked from network); 19 Feb 2013 17:54:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2013 17:54:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.180 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 209.85.128.180 mail-ve0-f180.google.com Received: from [209.85.128.180] ([209.85.128.180:57021] helo=mail-ve0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E3/D2-17768-E4CB3215 for ; Tue, 19 Feb 2013 12:54:23 -0500 Received: by mail-ve0-f180.google.com with SMTP id jx10so5964152veb.25 for ; Tue, 19 Feb 2013 09:54:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=mNSC009ZhlyjNuOqP/t4TrUgg5pX+ze8BWGlwoT8u4s=; b=aZSNr9RZWqNZdz9w5Eyg73FOEOatc4iNmPTITmUMCidPd2r9TucK7jIrlL0wxXKEOx n72Hip3aHIMhdAQYZ/hR4TzUB26x+t4zjg9ZmkKv9FGTcosKABbmmjd4gzmiALcbFhXW cYBo+g98IeZde9zkpAGV6mWZ+qXBqB3lJTU+pzfVoPuKX74uMVD1cM29CJRU0lnYQtZQ mJtAAhBqSeq894pzudW38lsgp6+elitBarpdPOElpS74MuB84MJH3jnq3h8f8C4Fot6l Wjx+os9M4Qj2T7PS+p3ebSPXtURAkPlaoTy7UzuMwgTWAQ9uDcJ7Yc794sxlCELTlfiT o0wA== X-Received: by 10.220.151.144 with SMTP id c16mr21904449vcw.18.1361296460638; Tue, 19 Feb 2013 09:54:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.58.118.52 with HTTP; Tue, 19 Feb 2013 09:54:00 -0800 (PST) In-Reply-To: <08CF292F-2A2E-4C2F-8CB8-6A4B1A91D0F4@inviqa.com> References: <8490FC41-2696-4948-83A1-3931674183B0@gmail.com> <3EBB0AF2-A114-4652-806B-C50DD8F9557D@inviqa.com> <08CF292F-2A2E-4C2F-8CB8-6A4B1A91D0F4@inviqa.com> Date: Tue, 19 Feb 2013 18:54:00 +0100 Message-ID: To: Marcello Duarte Cc: Leigh , Levi Morrison , PHP Internals Content-Type: multipart/alternative; boundary=f46d04388ddff86abc04d6178784 Subject: Re: [PHP-DEV] [RFC] Short syntax for anonymous functions From: ocramius@gmail.com (Marco Pivetta) --f46d04388ddff86abc04d6178784 Content-Type: text/plain; charset=UTF-8 @Marcello: actually, I am also of the idea that there's no real additional value in such a syntax... Since I'm using ZF2 (yeah, that framework that converts array to applications) I am kinda used to have dozens of `function () {}` closures for service factories: so far no problems with it. As stated before, it spares 9 chars while the end developer (devops or whoever coding instead of of the devops) loses a lot of readability that is not really such a big problem. Also, as it is for DSLs, you could always use a parser to handle this kind of thing in your own domain. What exactly is the limit that you see when applying the more verbose `function () {}` syntax? I am just wondering since moving to `{}` will still not make this portable to any platform except PHP itself. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --f46d04388ddff86abc04d6178784--