At 05:40 08-09-01, Chuck Hagenbuch wrote:
>It's the kind of thing that gets used a lot in HTML, where otherwise there
>wouldn't be a function call at _all_ - just static text. Replacing gettext()
>with _() in this case actually does improve readability, in my opinion.
That's exactly what I said - there are several other
functions/operators/labels which are used a lot and repeatedly, and we
never made any exceptions as far as clarity goes.
> > > It's documented, for what it's worth:
> > >http://www.php.net/manual/en/function.gettext.php
> >
> > That's unfortunate. IMHO, it should be phased out.
>
>Exceptions in php extensions have been made before where the extension
>mirrors
>the c library exactly, in order to not confuse people familiar with the
>library. This is another one of those cases - people familiar with gettext
>will
>be very confused if _() doesn't work the way they expect it to.
You're talking about exceptions in the naming convention? Well, the more
accurate way to describe it is that originally, modules tried to copy the
low-level API function names 1::1. Only at a later stage we started to
strive towards a standard naming convention. Today, when adding new
functionality, the low level API function names play no role, and the
functions are named using the PHP naming convention. We explicitly decided
that in the lengthy discussion about function naming convention that took
place half a year ago or so. There was no clear decision as to what to do
with the existing functions that are named after their low-level counterparts.
At any rate, this is not the kind of exception I was talking about. _
includes 0.0 information about what it does, and unless you know exactly
what it does, you're lost. It's not an issue of shortening words, or
neglecting to put underscores between words. Not only do you not stand a
chance understanding what you're reading without looking at documentation,
but you also have absolutely no way of finding what this does if you
actually look it up in a manual.
Zeev
Zeev
--
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]