Hi,

naming classes/function is really an important concern and I'm happy that such a thing gets a dedicated thread finally.

Stanislav Malyshev wrote:
internationalization capabilities of the ICU library to PHP 5, specifically 5.2.x and 5.3.x branches. We felt that as PHP gets more and

Is there any chance this is not going to be available for 5.2?


Because if so, I would add another option to the naming suggestions below:

* finally *use* namespaces

Although I'm next to not at all involved in the current development, this was actually on my mind for a view days and I was thinking about writing to the list.

Especially with so many classes at once introduced I think it would be a good idea to finally think about this too.


Personally, globbering the global namespace with such common names is irresponsible (but this has been discovered already).

Actually there are existing classes being named Locale, I fired a quick google code search:

http://www.google.com/codesearch?q=lang%3Aphp+class.*Locale&hl=en&btnG=Search+Code

Of course I've never heard of them myself, but it's really not hard to assume that such a class likely exists.

The same applies to the "Collator" class, see
http://www.google.com/codesearch?hl=en&lr=&q=lang%3Aphp+class.*Collator&btnG=Search

More example could probably be found but I think the two examples makes it clear that we need to namespace or prefix them. Of course I've never heard of and used any of those classes and I guess most internal developers here probably have neither, but that doesn't mean they aren't in use somewhere.

I understand that, as long as this has to be available for 5.2, namespaces are forever out because of BC. But if this could be pushed, I would really be happy.

Just to be clear, this is not some kind of bickering and especially not about ext/intl, but I'm trying to create a general awareness of problems we would run here in the future.

If namespaces aren't and option because waiting for 5.3 only is not viable, I'm for number four. Stop creating headaches with namespace/prefix-less introduction of new things.

4. Rename both classes and functions.
Pro: All API looks the same, purists are happy
Contra: API looks ugly, too many prefixes for functions.


thanks,
- Markus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to