Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65950 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57474 invoked from network); 19 Feb 2013 13:51:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2013 13:51:27 -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.46 cause and error) X-PHP-List-Original-Sender: mduarte@inviqa.com X-Host-Fingerprint: 74.125.82.46 mail-wg0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:54841] helo=mail-wg0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 09/87-17768-D5383215 for ; Tue, 19 Feb 2013 08:51:26 -0500 Received: by mail-wg0-f46.google.com with SMTP id fg15so5401874wgb.13 for ; Tue, 19 Feb 2013 05:51:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:mime-version:content-type:subject:date:in-reply-to :to:references:message-id:x-mailer:x-gm-message-state; bh=Fd2voaKXOva+tr4ZpuheU3+uBIvme9Eufo/XBzrP1mc=; b=aW+qa5gddpg1PIwVrik7BBVwgjrhiN+sIj13vOJPMVR5EvU/0K73fuPRllyQTqic5C YdAsmFqBzgBj1M3xnZV5/Lu6e0igITXVrESZIPSLugAuYfZcj7iEkgn+LFWRvn4y2EYg ibsa57IA0vH8ou3TRbplyqxsFdjU92oyEkSbh4hlTiINu2ZD1vMEsNBpwM1VJ/yxY7or x1m9DIfMPmIT+pdaisBxBQmOw5wdE2CQM/Jf+f4JuwUesfKwzqU8Tkbn6G1BenUGHroT 55dbKp54eSQrjCMy/3C7zFme7/0N9pP3A/UjDC9MA91R1BgqP3nh4PMJQe3tcTuAhOfL Gv+w== X-Received: by 10.180.84.199 with SMTP id b7mr25760276wiz.22.1361281883209; Tue, 19 Feb 2013 05:51:23 -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 t7sm25709122wiy.2.2013.02.19.05.51.21 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Feb 2013 05:51:22 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-3-722590811 Date: Tue, 19 Feb 2013 13:51:19 +0000 In-Reply-To: To: PHP Internals References: <8490FC41-2696-4948-83A1-3931674183B0@gmail.com> Message-ID: <3EBB0AF2-A114-4652-806B-C50DD8F9557D@inviqa.com> X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQmb7L5oDfrZO3VnZMI3fmpclWa4HDCuwneg69L6xYVKBiQF8EoyOyWRXa9CIY17nlVkzYXS Subject: Re: [PHP-DEV] [RFC] Short syntax for anonymous functions From: mduarte@inviqa.com (Marcello Duarte) --Apple-Mail-3-722590811 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Thanks for the feedback. I get most people here don't appreciate the = value of the feature. I can understand that If you haven't tried to write a tool like = capistrano, rspec, chef, puppet, etc, etc in PHP you probably won't see = much value in implementing such things. On 19 Feb 2013, at 13:19, Derick Rethans wrote: > On Tue, 19 Feb 2013, Marcello Duarte wrote: >=20 >> Inspired by Sara, here is another RFC, I finally got around to draft: >>=20 >> https://wiki.php.net/rfc/short-syntax-for-anonymous-function >=20 > I'd be really reluctant to add this -- it's yet another (superfluous)=20= > syntactical sugar, there is no patch, and how does this work with = bound=20 > variables (use keyword)? I added an example with the use keyword. What is superfluous for is useful for other users. It would be useful = building DSL. At my company we use loads of ruby tools for deploying, = provisioning, etc. just because of the DSL they provide. The array short = syntax was great news. Adding a short syntax for closures would make it = possible to write such scripts in PHP =96 where the syntax would not = stand on its way. On 19 Feb 2013, at 13:28, Patrick ALLAERT wrote: >> BC break detected: >>=20 >> > { >> echo "foo\n"; >> return "bar"; >> }; >>=20 >> echo "baz\n"; >> return 42; >> ?> I am actually more concerned with Patrick's feedback regarding BC. I = can't think of a solution for this right now. > cheers, > Derick >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20 -- Marcello Duarte= --Apple-Mail-3-722590811--