Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40522 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 320 invoked from network); 15 Sep 2008 17:55:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Sep 2008 17:55:50 -0000 Authentication-Results: pb1.pair.com header.from=chris_se@gmx.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=chris_se@gmx.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.net designates 213.165.64.20 as permitted sender) X-PHP-List-Original-Sender: chris_se@gmx.net X-Host-Fingerprint: 213.165.64.20 mail.gmx.net Linux 2.5 (sometimes 2.4) (4) Received: from [213.165.64.20] ([213.165.64.20:57025] helo=mail.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/5E-58592-5A1AEC84 for ; Mon, 15 Sep 2008 13:55:50 -0400 Received: (qmail invoked by alias); 15 Sep 2008 17:55:46 -0000 Received: from p54A1556A.dip.t-dialin.net (EHLO chris-se.dyndns.org) [84.161.85.106] by mail.gmx.net (mp020) with SMTP; 15 Sep 2008 19:55:46 +0200 X-Authenticated: #186999 X-Provags-ID: V01U2FsdGVkX1/pb2koaWfpy19Ob+Azd2r7FZYm4jshmaUFuSceX6 yeLgvmxItYYj7b Received: from [192.168.100.13] (cobalt.seiler.lan [192.168.100.13]) by chris-se.dyndns.org (Postfix) with ESMTP id 8A4C418F8C; Mon, 15 Sep 2008 18:54:31 +0200 (CEST) Message-ID: <48CEA125.9060201@gmx.net> Date: Mon, 15 Sep 2008 19:53:41 +0200 User-Agent: Thunderbird 2.0.0.16 (X11/20080707) MIME-Version: 1.0 To: Roman Borschel CC: Andrew Mason , Stanislav Malyshev , internals@lists.php.net References: <48C59D5C.4050507@chiaraquartet.net> <48C5A909.4030502@zend.com> <48C602D5.6020704@chiaraquartet.net> <48C6A6AA.7050003@zend.com> <48C9F2F6.4080007@chiaraquartet.net> <48CAC1EF.2090501@zend.com> <48CB20BA.4070609@chiaraquartet.net> <48CC85D7.4010401@zend.com> <48CCA3B1.5060602@chiaraquartet.net> <48CDD49E.9070808@zend.com> <99cd336d0809150044q7ab4db42vc3035b5a32393199@mail.gmail.com> <277E4C53-5B71-40A7-9389-C68FF98AE385@gmx.net> In-Reply-To: <277E4C53-5B71-40A7-9389-C68FF98AE385@gmx.net> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.66 Subject: Re: [PHP-DEV] Re: [PATCH] Re: [PHP-DEV] namespace examples (solving name resolutionorderissues) From: chris_se@gmx.net (Christian Seiler) Hi, >> << >> classes: >> >> 1) check current namespace >> 2) autoload if possible >> 3) fail >> >> functions: >> >> 1) check current namespace >> 2) check internal >> 3) fail >>>> >> >> I think this a good approach. I don't know how biased I am as I use >> the autoloader quite alot but it seems reasonable to me. > > I share that view. I share this view, too. Just for a small rationale why I *strongly* prefer this to "current / internal / autoload" (the behaviour in CVS): Not only because of the already stated fact that user classes are much more common than internal classes: One of the reasons namespaces were introduced was to avoid another DateTime debacle (anyone remember 5.1? ;-)) - thus that the introduction of new internal classes in later PHP versions would not lead to problems with existing code. If there is *any* chance that an internal class may be used instead of a user class, this *will* break this concept and thus the usefulness of namespaces would be reduced by quite a bit. The argument, that use namespace::ClassName is possible is bogus in my eyes since I wouldn't expect to have to import classes of the *same* namespace - as far as I know no other language does that and it is counter-intuitive. Importing classes from other namespaces (even the global one) however is something I would expect. (I probably repeated some arguments already presented but this is to sum up my stance on this topic.) Regards, Christian