I personally never use constants anyway. But at least functions and
variables should work with namespaces:
namespace name1 {
$var = 3;
function func();
}
From a language perspective those should exist only in that namespace.
I also think '\' as a seporator is nice. It has this nice filesystem
feeling to it. :)
(Although now I'm wondering if we use '\' as a seporator, shouldn't it
be possible to use '\' in stead of the Paamayim Nekudotayim '::'
seporator as well? Just to keep things consistent? hmmm... )
Oliver Grätz wrote:
Jessie Hernandez schrieb:
I think this is the best solution thus far. If any one of you still feels a
need for constants/functions, PLEASE show me a _valid_ example that cannot
be accomplished by just simply putting the constant/function inside a class
in the namespace.
No complaints from me. I try to avoid both since a long time. Functions
would be nice, simply for convenience (sometimes one wants to use
something so often that a static method just isn't as nice), but I
really don't see any need for global constants EXCEPT that supporting
everything that's currently OUTSIDE of namespaces would allow to
completetly clean it without further work.
If I don't hear of any valid arguments, then I'm going to go ahead and scrap
constants and functions and then concentrate on the final details of the
patch.
Did you give the "no namespaces in the ternary" idea a try?
Even if this doesn't make it I'd be happy to know if it works.
Anyways, +2 for both : and ::
OLLi
PS: I'm now preparing the final table. We should not stretch this any
more ;-) The First subscribers are getting heart attcks from too much
mail...
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php