Re: Re: PEAR::Date broken (Was: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/date php_date.c php_date.h)
| From: | Derick Rethans | Date: | Wed, 19 Jul 2006 07:13:09 +0000 |
| Subject: | Re: Re: PEAR::Date broken (Was: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/date php_date.c php_date.h) | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-24644@lists.php.net to get a copy of this message | ||
On Tue, 18 Jul 2006, Rasmus Lerdorf wrote:
> But having PHPFoo does not in any way prevent PHP::Foo() in a future version.
Maybe not, but you're already trying to find workaround for a problem
that isn't even there yet...
> Not namespacing it in 5.2 and then namespacing it in 6 means we break
> stuff for one version for no reason. The "screw you guys, you should
> namespaced your stuff" argument is the least userfriendly approach we
> could possibly take here and doesn't buy us anything longterm.
Actually, it does if we make enough fuss about it. We (as Lukas
suggests) should make these guidelines for user space naming and put the
rule "prefix your code" in there. In the end it's only education that
helps and avoids more problems in the future.
> I can see Andrei's argument for the iterator stuff where you do
> actually have to type it often, but his identifiers are already
> unlikely to clash and we could probably make an exception there.
Well, we already use prefixes for extensions, such as Soap* and DOM* and
Spl*... so I don't see anything inheritly wrong with "DateTime" and
"DateTimeZone" - they're both prefixed with the extension "Date" and
they are not *that* likely to be used as just "Date". However, if you
want that all classes are prefixed, we should do that for *all* of them
and don't make exceptions for TextIterators.
regards,
Derick