Matthias Pigulla wrote: >> Von: Stanislav Malyshev [mailto:[EMAIL PROTECTED] > >> But you could achiever the same just by avoiding naming classes the >> same as internal classes, you surely know which classes are in your >> own namespace? > ... >> Not using names of classes same as internal classes is not a big >> deal either - all PHP programmers do it right now :) > > Rumor exists that sometimes new internal classes show up in late RCs. > And as you try to name your classes so that the name describes the > modeled construct best, it is not surprising that core wants to name > such a new class "Date" just as userland folks had their classes > named "Date" as well before (shame on them). > > I always thought that one of the prime reasons for providing > namespaces was to mitigate this risk of breakage in a simple, > predictable and user-friendly manner.
Hi, I brought this issue up in the original thread about namespace implementation. I've also brought it up since then twice, including in the long rebuttal to Derick's RFC. Here again is the obvious solution: <?php namespace Foo; use Foo::DateTime; $a = new DateTime; ?> now __autoload() is called. End of crisis. Also possible is: <?php namespace Foo::Long::Thing; use Foo::Long::Thing as me; $a = new me::DateTime; ?> for a namespace with many classes. Could we move on from this problem? It is easily solved with the current implementation. Greg -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php