Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65940 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42610 invoked from network); 19 Feb 2013 13:20:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2013 13:20:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.181 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.128.181 mail-ve0-f181.google.com Received: from [209.85.128.181] ([209.85.128.181:61185] helo=mail-ve0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/34-17768-A3C73215 for ; Tue, 19 Feb 2013 08:20:58 -0500 Received: by mail-ve0-f181.google.com with SMTP id d10so5738118vea.40 for ; Tue, 19 Feb 2013 05:20: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=jGKqR6Rujtc2cZtuC3HH2ptfBfbD2WFpNbvtzA+4IZE=; b=l5qAwUlhAoZxs4womD9Laq1LQT/VJbZYuhc5qLq03Jb5QRZVrUeJAW0scO0puRuXju ZJGH3vSJRc7sk2/7IBP42gl7+zup64RiVmsAA+/prRZm580NayrvQv8DJlJOwLmy/H7b x5FQKvTm1TFbkED+lWGPzS64CUOrgWyALtmOYgtXtcByFsFsMMBWRkdfogFtvsyHgdg/ 8f7fN9fwmIso48thmrVj09MYUL8RwpIV6WwrMu6pgODwyqJnP3zF693+CLLxILC8dLFC gDoO0cGnYtRed8Q+lUnA5OESFTJ8jKD/FsG7S8W68rw3rHZnzdP1ab31irS3P6KMQe84 X4ow== MIME-Version: 1.0 X-Received: by 10.58.85.134 with SMTP id h6mr21179162vez.18.1361280055272; Tue, 19 Feb 2013 05:20:55 -0800 (PST) Received: by 10.58.56.137 with HTTP; Tue, 19 Feb 2013 05:20:55 -0800 (PST) In-Reply-To: <8490FC41-2696-4948-83A1-3931674183B0@gmail.com> References: <8490FC41-2696-4948-83A1-3931674183B0@gmail.com> Date: Tue, 19 Feb 2013 08:20:55 -0500 Message-ID: To: Marcello Duarte Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7b6d93402263f404d613b6ca Subject: Re: [PHP-DEV] [RFC] Short syntax for anonymous functions From: ircmaxell@gmail.com (Anthony Ferrara) --047d7b6d93402263f404d613b6ca Content-Type: text/plain; charset=ISO-8859-1 Marcello, On Tue, Feb 19, 2013 at 7:57 AM, Marcello Duarte wrote: > Inspired by Sara, here is another RFC, I finally got around to draft: > > https://wiki.php.net/rfc/short-syntax-for-anonymous-function > > Please feedback, > -- > Marcello Duarte > > I like the concept. I dislike the syntax. It looks too much like a JSON object declaration, and it feels like it should be returning an object instead of a closure/anonymous function. Additionally, I don't like that it's also a closure. Short functions like this should be for simple functions... Perhaps: lambda $x: trim($x); $x: trim($x); Or something similar... Anthony --047d7b6d93402263f404d613b6ca--