Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42764 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71661 invoked from network); 22 Jan 2009 06:03:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jan 2009 06:03:34 -0000 Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 76.96.30.56 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 76.96.30.56 qmta06.emeryville.ca.mail.comcast.net Received: from [76.96.30.56] ([76.96.30.56:40825] helo=QMTA06.emeryville.ca.mail.comcast.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6B/15-19181-43C08794 for ; Thu, 22 Jan 2009 01:03:33 -0500 Received: from OMTA12.emeryville.ca.mail.comcast.net ([76.96.30.44]) by QMTA06.emeryville.ca.mail.comcast.net with comcast id 6FjC1b0070x6nqcA6W3Wss; Thu, 22 Jan 2009 06:03:31 +0000 Received: from earth.ufp ([24.13.255.226]) by OMTA12.emeryville.ca.mail.comcast.net with comcast id 6W3W1b0014trKQ88YW3WkN; Thu, 22 Jan 2009 06:03:30 +0000 Received: from localhost (localhost [127.0.0.1]) by earth.ufp (Postfix) with ESMTP id ACB06D7A24 for ; Thu, 22 Jan 2009 00:03:28 -0600 (CST) Received: from earth.ufp ([127.0.0.1]) by localhost (earth.ufp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BjlSv+o02Meq for ; Thu, 22 Jan 2009 00:03:28 -0600 (CST) Received: from luna.localnet (unknown [192.168.42.1]) by earth.ufp (Postfix) with ESMTPSA id 71091D79DC for ; Thu, 22 Jan 2009 00:03:28 -0600 (CST) To: internals@lists.php.net Date: Thu, 22 Jan 2009 00:03:26 -0600 User-Agent: KMail/1.10.3 (Linux/2.6.27-7-generic; KDE/4.1.3; i686; ; ) References: <49778369.4070709@chiaraquartet.net> In-Reply-To: <49778369.4070709@chiaraquartet.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200901220003.26866.larry@garfieldtech.com> Subject: Re: [PHP-DEV] [RFC lite] implement import of functions in namespace From: larry@garfieldtech.com (Larry Garfield) On Wednesday 21 January 2009 2:19:53 pm Greg Beaver wrote: > [Drawbacks] > 1) requires changing the engine near beta Legitimate concern, but I happily defer t the maintainers here. > 2) adds new syntax to namespaces If I'm reading the RFC properly, it extends the existing syntax in a logical way without introducing any new reserved words. My only question then would be should we change the way classes are imported to use the keyword "class", to parallel this syntax? Eg: use class Foo\Bar; use function Foo\fanciness; If we're concerned about breaking code written for the existing alphas, perhaps "class" could be implied if not specified, so that we can recommend using it but not break existing code? I'm not sure if there's a performance concern there. > [Non-issues/Slight issues] > 1) would introduce one hash lookup on unqualified function calls at > compile-time if any "use" statement exists in the script, which is > unlikely to be detectable as a performance difference for even the > largest scripts. > > Thanks, > Greg +1 from me. -- Larry Garfield larry@garfieldtech.com