At 09:13 08-09-01, Andrei Zmievski wrote:
>At 05:33 AM 9/8/01 +0300, Zeev Suraski wrote:
>>That's unfortunate. IMHO, it should be phased out.
>I'm against it. _() has been around forever as part of gettext package and
>people who expect to find it in PHP will be pretty disappointed.
Disappointment isn't exactly the metrics here. People who migrate from
other languages will be disappointed not to find all sorts of things
they're used to from their old languages, but it has never been a reason to
_() has no room in PHP's naming convention. There's a small downwards
compatibility issue (it's not advertised very promptly), so we should
deprecate it just like we deprecate and have deprecated other functions in
Egon - what you said about the documentation is not something that is
really viewable from an end user's point of view. If you look at the
manual, you don't see it. If you look at the PHP function list, you see a
function with no prototype and no documentation. In short, unless you
happened to stumble upon it reading the documentation of gettext() - you
have no idea it exists.
If we can't deprecate a horrible name like this, I'm not sure why we held
this huge function naming convention discussion back then. _() is a
mistake that we can fix in a major version.
Again, by deprecating it now, the immediate action would be removing any
reference to it from the documentation (the very little there is). There
are a hell of a lot PHP users to come than there are existing users of PHP,
so we might as well limit the scope of the problem. We can also advertise
that this function will not be staying with us in the future, and that
people should use gettext() instead. We can add an E_NOTICE to it, which
would make fixing it a trivial single command. When we actually remove this
alias can be determined in the future.
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]