Home  |  Linux  | Mysql  | PHP  | XML
From:Jan Schneider Date:Tue Jun 10 04:33:13 2008
Subject:Re: intl 1.0.0RC1
Zitat von "Stanislav Malyshev" <stas@zend.com>:

> Hi!
>
>> Yes. Why can't it be IntlCollator in both 5.x and 6.x? In other words
>> (unless I'm missing something) compatibility between 5.x and 6.x doesn't
>> affect the naming choice.
>
> The thing is that having collators in PHP called IntlCollator and  
> locales in PHP called IntlLocale sucks. It looks so awkward and  
> artificial.

What kind of attitude is that? You personally think it sucks, so it's  
not going to happen?
It's not artificial or awkward at all, it's poor man's namespacing  
that we use in PHP since ages, because we don't have namespacing yet.  
Everybody is using it, especially in PHP internally.

>> I'm advocating uniformity for the sake of usability :-). (for reasons
>
> I don't see how IntlLocale is more usable than Locale. If you'd be  
> total stranger to all the things discussed here and I'd tell you -  
> there's a thing called "locale", what do you think would be the name  
> of the class that works with it - would you answer "Locale" or  
> "IntlLocale"?

If I would be a stranger, I wouldn't try guessing class names at all.  
Instead I would look into the manual. And I would easily spot that in  
the manual: extension == manual chapter == function/class prefix. THAT  
is usability.

>> already given). (I'm a freelance programmer, working on real-world
>> i18n-related code, not an ivory tower academic.)
>
> OK, great - and you'd prefer all your functions and classes to have  
> prefix Intl because of that? I know I wouldn't. I would like to have  
> class named Locale to work with locales.

Maybe because you DO live in the ivory tower and have the luxury to be  
able to start each project from scratch with the newest and freshest  
code.
Nobody else does. Anybody in the real-world is dealing with large  
portions of existing code, slowly integrating new features where see  
fit.
If anybody who is currently using i18n in his code (and only those are  
interested in ext/intl anyway), wants to use functionality from  
ext/intl, chances are high they have to rewrite their whole code,  
because they happen to use Collator or Locale already. Not very  
unlikely in i18n related code, isn't it? This is not different from  
trying introduce the Date class a few years back.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/

Navigate in group php.i18n at sever news.php.net
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by Zareef Ahmed
Powered By PHP Consultants