Re: namespace separator and whining

From: Date: Wed, 05 Nov 2008 03:13:00 +0000
Subject: Re: namespace separator and whining
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  Groups: php.internals 
Request: Send a blank email to internals+get-41679@lists.php.net to get a copy of this message
Note that I say "try internal" because the only purpose behind allowing this is to make it easier to use PHP's built-in functionality. Any userspace stuff should be specifically \prefixed or imported via use. And (yes) we need import for functions.
Greg
P.S. my mail server has been down for almost a week, apologies to anyone who is wondering why I haven't replied to your message, I probably didn't get it.
Hi, This is starting to bother me, to be honest. Every time we go back to this "fallback to internal X" I give examples and real world scenarios that will become broken in namespaces which work today outside a namespace. I get nods, agreement, people start talking that we should either fallback to *all global* functions, or *not fallback at all* so that the behavior is predictable for PHP users. ... And in few days we all forget problem and start talking about falling back to *internal* again. People do implement fallbacks for internal functionality as userspace functions/classes on their own, TODAY. In namespace, if you don't treat internal/user equally in resolution, things will work outside a namespace, and break inside it. This will be confusing to people, who especially use fallbacks to transparently implement missing PECL extensions or functionality, or augment the internal functions of PHP with other, for ex. user implemented ifsetor(), array_*() or str*() functions. Regards, Stan Vassilev

« previous php.internals (#41679) next »