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

From: Date: Sat, 26 Nov 2005 03:46:01 +0000
Subject: Re: Re: PHP 5.1 (Or How to break tousands of apps out there)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-20483@lists.php.net to get a copy of this message
Hello Bob, Bob Silva 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
Well said :-)! In fact, some months ago, I posted initial support for functions in namespaces, asking if I should go ahead with this, saying that I think classes were enough. Several agreed that just allowing classes in namespaces was enough, including Andi himself. The fact that I now have complete function support in my patch is just a bonus. I really don't care for constants in namespaces. If I need them, I can simply have a "Config" class inside my namespace that contains all the constants I need (I already use this approach at work, anyways). Regards, Jessie Hernandez

« previous php.internals (#20483) next »