Re: Re: PHP 5.1 (Or How to break tousands of apps out there)

From: Date: Sat, 26 Nov 2005 09:28:03 +0000
Subject: Re: Re: PHP 5.1 (Or How to break tousands of apps out there)
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  Groups: php.internals 
Request: Send a blank email to internals+get-20510@lists.php.net to get a copy of this message
Marcus Boerger wrote:
here again namespaces would be perfect. Given a lib that doesn't prefix you'd simply do: namespace LibNameHere { reqire "some_lib_include"; } and be done...wohooo :-)
Only if newly introduced PHP core classes use a namespace too. You'll have to use PHP\Date (or the like) if you want to avoid conflicts in existing code. Plus maybe something like "import PHP\Date as Date" or something along these lines if you want to avoid PHP\ in newly written code where you know that there is no Date class yet. PS: I'd rather have : for namespaces with the whitespace restriction for ? a:x : b:y than the confusing (escaping characters outside of a string?) backslash. - Chris
Have I missed something or what? Why not use C++ style for namespaces? backslash is really ugly! Nuno

« previous php.internals (#20510) next »