Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65965 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87928 invoked from network); 19 Feb 2013 16:31:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2013 16:31:49 -0000 Authentication-Results: pb1.pair.com header.from=mduarte@inviqa.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mduarte@inviqa.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain inviqa.com from 74.125.82.54 cause and error) X-PHP-List-Original-Sender: mduarte@inviqa.com X-Host-Fingerprint: 74.125.82.54 mail-wg0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:65194] helo=mail-wg0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 11/6D-17768-3F8A3215 for ; Tue, 19 Feb 2013 11:31:48 -0500 Received: by mail-wg0-f54.google.com with SMTP id fm10so5544815wgb.21 for ; Tue, 19 Feb 2013 08:31:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:mime-version:content-type:from:in-reply-to:date :cc:content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=bAoPFkhm9772KSXYDMx98kPz4psgLB+zTvXTnHqVFvk=; b=LIuZTYPUfYOpMtm60+hb/CtHwYqRsQtPoKpxWDqLDb3OLmouahhvvw6lojNyhtksRt PhUumZ6kNuHfJCmUfH82AFLWhD3FoXVuQItel/FcP2NAEkY5A55FPauTjXZnA6wwAfPp Yv1UsqCIZczr9+ce48hhVRi25hfvhAQiu+ys/8Ppo+IjBbCqrZF1ljjcfXwrSRBN6Z+z OAs+JmQ8AM+WG9Q/OSrvZcBZ1AJLNktYrdYPeUxuNWY5gf1cgGY+0imN96/xejDg/hH/ kx4uN2IWYfx6pcHzxgD54eepC12Cc3Ox3ojA2dlnQg4v50B/CDahEJbArJvJa9OIa3C1 jDuw== X-Received: by 10.180.74.131 with SMTP id t3mr26633346wiv.26.1361291504107; Tue, 19 Feb 2013 08:31:44 -0800 (PST) Received: from [192.168.2.6] (cpc11-finc13-2-0-cust737.4-2.cable.virginmedia.com. [82.1.90.226]) by mx.google.com with ESMTPS id ex15sm26495037wid.5.2013.02.19.08.31.41 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Feb 2013 08:31:43 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii In-Reply-To: Date: Tue, 19 Feb 2013 16:31:39 +0000 Cc: Levi Morrison , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <85808314-2EC5-49B6-AF85-375597E20B60@gmail.com> References: <8490FC41-2696-4948-83A1-3931674183B0@gmail.com> To: Morfi X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQnV+NQ5n3eC67ICo70Pv5iVB/lrSarE4Z41r8iff/Cf6FxUBJPQeaqaRA02qDdbEPNqfGJk Subject: Re: [PHP-DEV] [RFC] Short syntax for anonymous functions From: mduarte@inviqa.com (Marcello Duarte) On 19 Feb 2013, at 16:29, Morfi wrote: > ($n) =3D> { echo $n; } > ($n) use ($m) =3D> { echo $n; } Morfi, the problem pointed out already is when you have no arguments it = would be the same as the statement block, which would cause BC issues. > On Tue, Feb 19, 2013 at 8:11 PM, Levi Morrison = wrote: >=20 >>> IF (and I stress if) we add a a shorter anonymous function syntax = I'd >>> like it to be geared towards one-liners because that's where the >>> current syntax feels really verbose, especially when you close over >>> other variables: >>>=20 >>> function ($n) use ($m) { return $m * $n; } >>>=20 >>> Versus one potential option: >>>=20 >>> ($value) |$m| =3D> $m * $n; >>=20 >> My apologies, this was meant to read: >>=20 >> ($n) |$m| =3D> $m * $n; >>=20 >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >>=20 >>=20 >=20 >=20 > --=20 > Best regards, Andrey -- Marcello Duarte marcello.duarte@gmail.com http://marcelloduarte.net