Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76347 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3960 invoked from network); 4 Aug 2014 19:49:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2014 19:49:18 -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 192.64.116.207 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.207 imap2-2.ox.privateemail.com Received: from [192.64.116.207] ([192.64.116.207:35796] helo=imap2-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/F1-27074-DB3EFD35 for ; Mon, 04 Aug 2014 15:49:18 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id F08C48C0075; Mon, 4 Aug 2014 15:49:41 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id McuQ7dgMUpN5; Mon, 4 Aug 2014 15:49:41 -0400 (EDT) Received: from [192.168.0.15] (unknown [90.210.122.167]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 872318C007D; Mon, 4 Aug 2014 15:49:40 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <53DFE1FC.5040206@gmail.com> Date: Mon, 4 Aug 2014 20:49:36 +0100 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: References: <53DF2BED.10103@sugarcrm.com> <06F3EF08-21B1-49AD-9D9D-5043C69AC1D8@ajf.me> <53DFE1FC.5040206@gmail.com> To: Rowan Collins X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] [RFC] Closure::call and Function Referencing as Closures From: ajf@ajf.me (Andrea Faulds) On 4 Aug 2014, at 20:41, Rowan Collins wrote: > > It does not permit dynamic references such as |&$classname::foo|, = due to conflicts with existing syntax and for symmetry (while = |&$classname::foo| would be doable, |&FooBar::$foo| is not, so we do = neither). >=20 > I'm not entirely sure of the reasoning in the parentheses, actually. = Do you just mean that only the &FooBar::$foo case conflicts with = existing logic? Right, while &FooBar::$methodname would conflict, &$classname::foo would = not. I do neither for the sake of consistency, as having one but not the = other worse might cause confusion. This has the benefit, I suppose, that = & is completely static. You can see at =93compile-time=94 whether it=92s = valid and what function is being used. I think that would be good for = static analysis. IMO, it=92d also be good for Hack as it could use this = instead of fun(). -- Andrea Faulds http://ajf.me/