Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20834 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37377 invoked by uid 1010); 29 Nov 2005 15:37:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37361 invoked from network); 29 Nov 2005 15:37:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Nov 2005 15:37:31 -0000 X-Host-Fingerprint: 64.253.207.194 miami194.us.univision.com Received: from ([64.253.207.194:13288] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 86/C0-14828-AB57C834 for ; Tue, 29 Nov 2005 10:37:30 -0500 Message-ID: <86.C0.14828.AB57C834@pb1.pair.com> To: internals@lists.php.net References: <00A2E2156BEE8446A81C8881AE117F192C1D5D@companyweb> Date: Tue, 29 Nov 2005 10:35:06 -0500 Lines: 62 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Posted-By: 64.253.207.194 Subject: Re: [PHP-DEV] Basic Namespace Requirements From: jrhernandez05@gmail.com ("Jessie Hernandez") Matthias, Simply put, const != define. Like I think Sara mentioned before, defines are runtime-defined, and making it both compile-time/runtime defined based on context will be really confusing. Also, I'm not accepting variables in namespaces and this is not needed either. So, yes, this is outside the scope of what I want to accomplish. Regards, Jessie ""Matthias Pigulla"" wrote in message news:00A2E2156BEE8446A81C8881AE117F192C1D5D@companyweb... > Von: Jessie Hernandez > So, the question is, can we scrap both namespace constants > and namespace functions and just stay with classes (as was > agreed on several months ago, Andi himself agreeing to it)? ... > I think this is the best solution thus far. If any one of you > still feels a need for constants/functions, PLEASE show me a > _valid_ example that cannot be accomplished by just simply > 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 that uses predefined constants and classes that might conflict with 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 [=constants?] and functions in namespaces, but variables as well. namespace X { var $foo = 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.