Re: Question about Namespace patch

From: Date: Fri, 27 Jul 2007 03:44:30 +0000
Subject: Re: Question about Namespace patch
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Groups: php.internals 
Request: Send a blank email to internals+get-31286@lists.php.net to get a copy of this message
On Wed, July 25, 2007 10:27 am, Sebastian Mendel wrote: > Stanislav Malyshev schrieb: >>> But why not allow importing namespaced functions and constants into >>> the global namespace? >> >> Because there's really no need to. Nothing wrong with >> namespace::function(). > > so i can not use a lib that switched to namespaces in my old code that > does > not support namespace? > > with other words: > > i have to rewrite my whole code to use the new version of a lib that > has > switched to namespace? > > > thats makes transition really easy ... so why should any lib switch to > namespace if this implies all apps using this libarary needs to > rewrite > their code? Since a "code rewrite" consists of slapping "<?php package foo;?>" or something similar at the top of each file, and even a moron like me could manage that in a very short time, I don't think this is much of an issue, personally. There will be many who won't use namespaces/packages/whatevers until all "live" versions of PHP support them. That's just the nature of the beast. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.internals (#31286) next »