Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32903 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27835 invoked by uid 1010); 21 Oct 2007 14:51:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 27820 invoked from network); 21 Oct 2007 14:51:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Oct 2007 14:51:39 -0000 Authentication-Results: pb1.pair.com header.from=chuck@horde.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=chuck@horde.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain horde.org designates 66.92.78.250 as permitted sender) X-PHP-List-Original-Sender: chuck@horde.org X-Host-Fingerprint: 66.92.78.250 dsl092-078-250.bos1.dsl.speakeasy.net Received: from [66.92.78.250] ([66.92.78.250:52113] helo=technest.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/F4-32256-8776B174 for ; Sun, 21 Oct 2007 10:51:38 -0400 Received: by technest.org (Postfix, from userid 33) id 86AB87F00D; Sun, 21 Oct 2007 10:51:24 -0400 (EDT) Received: from tatiana (tatiana [192.168.1.2]) by technest.org (Horde Framework) with HTTP; Sun, 21 Oct 2007 10:51:24 -0400 Message-ID: <20071021105124.85283gxiqqx9zse8@technest.org> Date: Sun, 21 Oct 2007 10:51:24 -0400 To: Stanislav Malyshev Cc: internals@lists.php.net References: <20071019224202.20245u5zry52h5c8@technest.org> <471A6B32.3080401@zend.com> <20071020172658.1680416b83wxgv6s@technest.org> <471A7C88.6090904@zend.com> <20071020184554.69044keujpgfelus@technest.org> <471A8A12.3050407@zend.com> <20071020191948.19935z9hoqcn9c84@technest.org> <471A9049.1020408@zend.com> <20071020194217.98794nbyt3bwrlnk@technest.org> <471AEF26.5000601@zend.com> In-Reply-To: <471AEF26.5000601@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.2-cvs) Subject: Re: [PHP-DEV] Order of class resolution with namespaces and autoload From: chuck@horde.org (Chuck Hagenbuch) Quoting Stanislav Malyshev : > "import PHP" is a no-op now. However, I have another idea about it =20 > (besides the fix for the import thing that indeed looks like a bug =20 > to me) - what if we add some syntax to say "use this namespace" =20 > which would use autoload, so you'd say: > > namespace Test; > throw new this::Exception(); > > and it would mean Test::Exception (including autoloading). Without =20 > concentrating on 'this' name (we may have another, better name for =20 > that) would it make things better? I don't think this helps; it means that you need to use the local =20 syntax every time you use a class, instead of importing it once, and =20 it doesn't resolve the fact that if you use a non-fully-qualified =20 classname (like Directory, for a different example), you need to say =20 ::Directory or else if a previous file in your namespace has defined a =20 Directory class, the class you end up using changes. This unpredictability is I think the worst part of the current implementatio= n. -chuck