Re: Re: towards a 5.3 release

From: Date: Mon, 08 Sep 2008 18:39:24 +0000
Subject: Re: Re: towards a 5.3 release
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.internals 
Request: Send a blank email to internals+get-40364@lists.php.net to get a copy of this message
Stanislav Malyshev wrote: > Hi! > >> And what happens when you have two libraries and each has their own Date >> implementation? How is that any different? If you could alias in >> functions, you'd simply alias them in differently - call one _() and one >> new_gettext - that's the point of aliasing, to avoid collisions > > It's not different. But if you can have _() and new_gettext() - how > exactly is it so much better than Foo::_() and Bar::_()? So different > that the former is OK but the latter is absolutely useless? Just because > it the latter has ::? What is the point? Wouldn't it be just as well to have static methods in a class instead? What do I gain by having functions in namespaces? For me it's useless because there's another way to do exactly the same thing...don't we already have enough of that in PHP? >> libraries. Let's just say it was an eye opening experience, and where >> my opinion that functions in namespace are essentially useless came from >> , since it forces procedural coders to totally alter the way they're >> accustomed to writing code. > > Well, yes, I guess it would make procedural coders be acquainted with > ::. Which is IMHO about time if they want namespaces - namespaces is OO > feature, so they can't have it both ways - use the sweet OO goodies but > stay with old procedural mindset. :) hehe - devil's advocate here - in that case why have functions in namespaces at all? I can see a case for constants ...but not functions. If functions in namespaces won't have the same treatment or features as classes why bother ;) Thanks, Elizabeth

« previous php.internals (#40364) next »