Bob, As I posted several months ago, I'm happy with just having classes in namespaces. The idea for functions/constants came from Derick's meeting notes page (http://php.net/~derick/meeting-notes.html) and these were listed as "requirements", though I doubt that they're really needed also.
Regards, Jessie ""Bob Silva"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Has there ever been a formal specification for what functionality namespaces > should provide within PHP? > > I don't see how we can help if we don't know what your ideas for namespaces > are. I would be more than happy to start one so we can get a consensus on > what namespaces (if implemented) will look like. For instance, I personally > do not see the need for namespace constants and functions, but I don't have > the complete vision of where PHP is heading either. I also do not think that > "internal prefixing" is the most elegant or right solution. > > I don't see that a patch will ever be accepted if we don't have agreement of > what namespaces should do and not do. > > > Bob Silva > > > -----Original Message----- > From: Jessie Hernandez [mailto:[EMAIL PROTECTED] > Sent: Monday, November 28, 2005 8:03 AM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Re: PHP 5.1 (Or How to break tousands of apps out > there) > > Dmitry, > > Can you send me the patch (or alternatively, where can I get it)? I'd like > to see how you did this. > > My problem with "::" is that you can't distinguish between calling a > function in a namespace and calling a static method, e.g.: > > a::b() > > This can mean either "call static method b of class a" or "call function b > in namespace a". Does your patch solve a similar problem? > > > Regards, > > Jessie > > > > ""Dmitry Stogov"" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Marcus, > > > > You saw my patch that works with "::" and doesn't break any scripts. > > > > Dmitry. > > > > > -----Original Message----- > > > From: Marcus Boerger [mailto:[EMAIL PROTECTED] > > > Sent: Saturday, November 26, 2005 3:42 PM > > > To: Bob Silva > > > Cc: 'Christian Schneider'; 'PHP internals' > > > Subject: Re: [PHP-DEV] Re: PHP 5.1 (Or How to break tousands > > > of apps out there) > > > > > > > > > Hello Bob, > > > > > > it is only awkward because you want to turn php into c++. > > > We are a different language here and thus can chose any > > > separator that works for us. And neither : nor :: work. > > > Instead from keeping us from working by having to explain > > > this over and over and over again i suggest you show me a > > > working patch that does not break trillions of php scripts. > > > > > > marcus > > > > > > Saturday, November 26, 2005, 3:36:42 AM, you wrote: > > > > > > > For what its worth (not much), I'd rather give up namespace > > > constants > > > > and use : rather than enforce whitespace which is just BAD from a > > > > language perspective. Makes it feel like programming in bash. The > > > > concept behind namespaces (in PHP at least) is rooted in OOP, so > > > > requiring a class just to have constants in your namespace > > > isn't too > > > > much to ask for. The parser should always be able to handle > > > > <namespace>:<class>::<whatever> and not conflict with other syntax. > > > > > > > If we are truly stuck with \ so be it, but I think > > > alternatives with > > > > some level of compromise should be considered before \ is settled > > > > upon. It's just plain awkward IMO. > > > > > > > > > > Bob Silva > > > > > > > > > >> -----Original Message----- > > > >> From: Christian Schneider [mailto:[EMAIL PROTECTED] > > > >> Sent: Friday, November 25, 2005 4:42 PM > > > >> To: Marcus Boerger > > > >> Cc: PHP internals > > > >> Subject: Re: [PHP-DEV] Re: PHP 5.1 (Or How to break > > > tousands of apps > > > >> out > > > >> there) > > > >> > > > >> 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 > > > >> > > > >> -- > > > >> PHP Internals - PHP Runtime Development Mailing List > > > >> To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > Best regards, > > > Marcus > > > > > > -- > > > PHP Internals - PHP Runtime Development Mailing List > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php