Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68529 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16959 invoked from network); 15 Aug 2013 13:31:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2013 13:31:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=igor@wiedler.ch; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=igor@wiedler.ch; sender-id=unknown Received-SPF: error (pb1.pair.com: domain wiedler.ch from 217.26.49.174 cause and error) X-PHP-List-Original-Sender: igor@wiedler.ch X-Host-Fingerprint: 217.26.49.174 mxout014.mail.hostpoint.ch Received: from [217.26.49.174] ([217.26.49.174:10892] helo=mxout014.mail.hostpoint.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/32-06453-918DC025 for ; Thu, 15 Aug 2013 09:31:05 -0400 Received: from [10.0.2.45] (helo=asmtp012.mail.hostpoint.ch) by mxout014.mail.hostpoint.ch with esmtp (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1V9xdk-000J4c-CI; Thu, 15 Aug 2013 15:31:00 +0200 Received: from [84.73.218.139] (helo=[10.0.1.97]) by asmtp012.mail.hostpoint.ch with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1V9xdk-0001pk-6q; Thu, 15 Aug 2013 15:31:00 +0200 X-Authenticated-Sender-Id: igor@wiedler.ch Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) In-Reply-To: <1376573053.14536.219.camel@guybrush> Date: Thu, 15 Aug 2013 15:30:49 +0200 Cc: Marcello Duarte , Daniel Bingham , Michael Wallner , "internals@lists.php.net" Content-Transfer-Encoding: quoted-printable Message-ID: <1E653665-A9B6-4BA6-A72B-6C871AE9BBB6@wiedler.ch> References: <60BF8DD5-FEEA-47D9-834F-6C7FDEF3B879@wiedler.ch> <6644FE5E-4CBA-4A08-8766-8634CAA4426D@wiedler.ch> <1376573053.14536.219.camel@guybrush> To: =?iso-8859-1?Q?Johannes_Schl=FCter?= X-Mailer: Apple Mail (2.1508) Subject: Re: [PHP-DEV] [RFC] Importing namespaced functions From: igor@wiedler.ch (Igor Wiedler) I was about to make the same point as Johannes. Trying all possible = variants in the autoloader is simply too slow (and in fact the main = reason why we don't have function autoloading). On the flip-side, the = current proposal would allow adding function autoloading more easily in = the future. Another note: To address the issue in a different way, some sort of = syntax for importing multiple names would be nice. Something like: from foo use bar, baz; But that is way out of scope, and should be done as a separate proposal. Regards, Igor On Aug 15, 2013, at 3:24 PM, Johannes Schl=FCter = wrote: > On Thu, 2013-08-15 at 14:11 +0100, Marcello Duarte wrote: >> Hi, >>=20 >> Are there any thoughts regarding importing multiple functions of a >> namespace with a wildcard? >>=20 >> A use case being, for example, assertions from a testing framework. >>=20 >> use (or use function) TestingFramework\Assertions\> here>; // in java * is used for wildcard >=20 > Unlike Java and others we can't easily know all available choices. >=20 > Consider >=20 > use (or use function) Foo\*; > use (or use function) Bar\*; > foo(); >=20 > Will this be a global foo, Foo\foo or Bar\bar? This becomes more funny > with the fact that PHP allows includes at runtime >=20 > use (or use function) Foo\*; > use (or use function) Bar\*; > foo(); // only \foo() exists > include 'Foo\foo.php'; > foo(); // Foo\foo() now exists, too >=20 > johannes >=20