Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20812 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92254 invoked by uid 1010); 29 Nov 2005 11:06:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 92239 invoked from network); 29 Nov 2005 11:06:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Nov 2005 11:06:32 -0000 X-Host-Fingerprint: 195.227.108.51 wfserver02.wf-ppr.de Windows 2000 SP2+, XP SP1 (seldom 98 4.10.2222) Received: from ([195.227.108.51:47928] helo=wfserver02.wf-ppr.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 0A/FC-21657-6363C834 for ; Tue, 29 Nov 2005 06:06:31 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Date: Tue, 29 Nov 2005 12:06:19 +0100 Message-ID: <00A2E2156BEE8446A81C8881AE117F192C1D5D@companyweb> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] Basic Namespace Requirements Thread-Index: AcX0Z8XPjODJiN5rRBCOP56I75w37QAa51Rw To: "Jessie Hernandez" , Subject: AW: [PHP-DEV] Basic Namespace Requirements From: mp@webfactory.de ("Matthias Pigulla") > Von: Jessie Hernandez=20 > So, the question is, can we scrap both namespace constants=20 > and namespace functions and just stay with classes (as was=20 > agreed on several months ago, Andi himself agreeing to it)?=20 ... > I think this is the best solution thus far. If any one of you=20 > still feels a need for constants/functions, PLEASE show me a=20 > _valid_ example that cannot be accomplished by just simply=20 > putting the constant/function inside a class in the namespace. Bart de Boer came up with a good reason for them so I'd like to re-post his statement. Namespace constants can be handy if you'd want to include some library=20 that uses predefined constants and classes that might conflict with=20 other classes and constants in the script. namespace someLib { include('huge_conflicting_library_that_I_dont_want_to_reverse_engineer') ; } Of course, that would not only require to put defines [=3Dconstants?] = and functions in namespaces, but variables as well. namespace X { var $foo =3D 1; function bar($p) {} } X::bar(X::$foo); which can, of course, not easily be distinguished from static class members. So is the whole "include-legacy-stuff-into-namespace"-approach beyond the scope of what you're trying to do? -mp.