Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54340 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30565 invoked from network); 4 Aug 2011 08:50:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2011 08:50:39 -0000 Authentication-Results: pb1.pair.com header.from=frederic.hardy@mageekbox.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=frederic.hardy@mageekbox.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mageekbox.net from 217.70.183.195 cause and error) X-PHP-List-Original-Sender: frederic.hardy@mageekbox.net X-Host-Fingerprint: 217.70.183.195 relay3-d.mail.gandi.net Linux 2.6 Received: from [217.70.183.195] ([217.70.183.195:34216] helo=relay3-d.mail.gandi.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A9/12-18399-E5D5A3E4 for ; Thu, 04 Aug 2011 04:50:39 -0400 X-Originating-IP: 217.70.178.129 Received: from mfilter12-d.gandi.net (mfilter12-d.gandi.net [217.70.178.129]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id F10BCA8080; Thu, 4 Aug 2011 10:50:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter12-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter12-d.gandi.net (mfilter12-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 0OPN7p6L7IEq; Thu, 4 Aug 2011 10:50:33 +0200 (CEST) X-Originating-IP: 92.103.14.114 Received: from [10.0.1.60] (unknown [92.103.14.114]) (Authenticated sender: frederic.hardy@mageekbox.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPA id 5438CA808B; Thu, 4 Aug 2011 10:50:33 +0200 (CEST) Message-ID: <4E3A5D58.9090505@mageekbox.net> Date: Thu, 04 Aug 2011 10:50:32 +0200 Reply-To: frederic.hardy@mageekbox.net User-Agent: Thunderbird 2.0.0.24 (X11/20101027) MIME-Version: 1.0 To: dukeofgaming CC: Rasmus Lerdorf , Lazare Inepologlou , internals@lists.php.net References: <4E3A48F2.4000503@lerdorf.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] An implementation of a short syntax for closures From: frederic.hardy@mageekbox.net (=?ISO-8859-1?Q?Fr=E9d=E9ric_Hardy?=) Hello ! > I've always thought that just supressing the "function" keyword could w= ork > as a shorthand, i.e. having ([param1 [, param2 [, ...]]]){...}. Somewha= t > similar to Ruby's lambda shorthand: > http://slideshow.rubyforge.org/ruby19.html#40 > =20 Huge +1 for that. Code using closures will be more readable. >>> $add =3D | $x |=3D> | $y : $x |=3D> $x+$y; >>> =20 Not sure that it's really readable. Moreover, it's more Perl/Ruby way than PHP way. Best regards, Fred --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Fr=E9d=E9ric Hardy : Architecte d'application/Admin. syst=E8me/Ergonome CV : http://blog.mageekbox.net/public/cv.frederic.hardy.pdf Blog : http://blog.mageekbox.net Twitter : http://twitter.com/mageekguy =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D