Stanislav Malyshev wrote:
> RC>> read (and comprehended) more easily, so the purpose of the
> RC>> function is less ambiguous. Without them, the name becomes less
> Please explain how presense or absense of underscore makes name more or
> less ambigious. I'm really lost here.
It's more legible for the same reason that it's easier (and faster) to read
"one two three" than "onetwothree". The human mind can easily tokenize at
the appropriate places, when it has a token. Without a token, the string
is much harder to parse.
Even StudlyCaps works the same way, as the "token" is based on the letter's
For the very same reason that I use a space bar when typing email, I
use an underscore when a spacebar is inappropriate.
> RC>> Much of the time I already know the function names, I just don't know
> Huh? Tell me what function searches ldap database for a string without
> looking in the manual?
There's several, in order of use: ldap_connect, ldap_bind, ldap_search.
Without looking in the manual, I _don't_ have to guess if it's ldap_search
or ldapsearch. Which is my entire point. I know the ldap functions were
written with a consistent "word_word_word" scheme. Other extensions don't
use this, so I _do_ have to check back in a reference.
> Is it ldap_search? ldap_query? Now how do you get
> results? Is is ldap_get_result? ldap_fetch_result? ldap_get_row?
> ldap_get_value? ldap_get_values? ldap_read?
ldap_get_entries. (not ldapget_entries, not ldap_getentries, not
LdapGetEntries, not LDAP_getentries...(more on case and the docs below))
> More guessing? Did you already
> look in the manual? I bet you did. And underscores didn't help you.
I didn't check a manual. Ldap functions aren't named in a mixed fashion
of word_wordword and word_word_word. They follow the *most common* PHP
syntax of using word_word_word.
How having underscores helps is that I'm not guessing at whether or not
"the ldap function that gets entries" is named "ldap_get_entries" or
"ldap_getentries" or "ldapget_entries" or "ldapgetentries".
That's the point. I have an expectation that functions will be named
consistently, so I _don't_ have to RTFM each time I need to use a
rarely used function. Other function families are so mixed up that
I spend more time reading manuals.
> So, you propose to name GD functions image_gif instead of ImageGif and
> confuse all the users that were so unlucky as to have previous acquitance
> with GD?
Yes. Rename them, and deprecate the old ones, alias them, and remove
them much later.
To stop confusing the *language*, as a whole, we should be doing this with
some consistency, so we're not confusing people as they try to learn new
function names. They shouldn't have to guess, or read the manual, just
to figure out the "proper spacing" in invoking it.
Here's the current breakdown:
COM: Calendar: word_word_word/word_wordword
DOM XML: word_word_word/word_wordword/wordwordword
Oracle 8: WordWordWord
Program Exec: wordwordword
Ignoring case, the extension count, and the possible naming styles, is
Some extensions use more than one style, but the one most often
used is word_word_word. Many functions fit into word_word, which
is not affected one way or another by observing the most common
thread in naming.
The standard seems to already be in place.
Personal: [EMAIL PROTECTED], 520-326-6109, http://www.opus1.com/ron/
Work: [EMAIL PROTECTED], 520-546-8993, http://www.pnsinc.com/
The opinions expressed in this email are not necessarily those of myself,
my employers, or any of the other little voices in my head.
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]