Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63157 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85389 invoked from network); 19 Sep 2012 17:20:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2012 17:20:10 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 64.22.89.134 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 64.22.89.134 oxmail.registrar-servers.com Received: from [64.22.89.134] ([64.22.89.134:36426] helo=oxmail.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/7D-15057-9CEF9505 for ; Wed, 19 Sep 2012 13:20:10 -0400 Received: from [192.168.0.200] (5ad4bfa1.bb.sky.com [90.212.191.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id C5CB5F0033; Wed, 19 Sep 2012 13:20:05 -0400 (EDT) Message-ID: <5059FE96.7080406@ajf.me> Date: Wed, 19 Sep 2012 18:19:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Levi Morrison CC: Steve Clay , PHP Internals References: <50593266.5010802@mrclay.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: alternative callback syntax From: ajf@ajf.me (Andrew Faulds) On 19/09/12 18:16, Levi Morrison wrote: > On Tue, Sep 18, 2012 at 8:48 PM, Steve Clay wrote: >> Hello, >> >> https://wiki.php.net/rfc/alternative_callback_syntax is a proposal for a simple alternative syntax for creating function callbacks. >> >> The basics: Given a function/method call, replace the argument list with "::function". PHP would evaluate this as a callback for the function/method, fully resolving any class/function names according to the current namespace and any use statements. >> >> In my opinion this syntax would aid readability and benefit users via fewer typos and namespace errors, and via (hopefully) better IDE support. >> >> >> I welcome any feedback. I don't have adequate C skills to offer a patch at the moment, but I generally read everything I can get my hands on about how PHP features are implemented and am not afraid to jump in. >> >> Thanks for your time. >> >> P.S. I've kicked around this idea around for awhile, but Ralph Schindler's idea for using ::keyword provided a better path to BC, and more attractive/meaningful syntax. >> >> P.P.S. I'm unaware if it's customary to throttle the release of RFCs, so I apologize for hogging any attention away from those under discussion. >> >> Steve Clay >> -- >> http://www.mrclay.org/ >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> > I do not like this proposal. The syntax is ugly and not intuitive. > We need a different way to accomplish this. I completely agree. How about &function_name? Resembles C (function pointers!), and unless I'm getting confused, it isn't currently legal syntax for something else. -- Andrew Faulds http://ajf.me/