Re: RE: [PHP-QA] Re: [PHP-DEV] ctype function (re?)naming

From: Date: Wed, 28 Feb 2001 10:26:49 +0000
Subject: Re: RE: [PHP-QA] Re: [PHP-DEV] ctype function (re?)naming
References: 1  Groups: php.dev php.qa 
Request: Send a blank email to php-dev+get-47662@lists.php.net to get a copy of this message
RC>> I find it annoying having to look up reference manuals for every RC>> function, to figure out whether or not I need to use RC>> underscores, and if so, where in the function name should they I repeat: if you never though of any function that detemines if the character is an alphanumeric character or not, you *HAVE* to look in the manual, since it could be is_alpha, is_alphanumeric, is_digit_or_letter, alphanumeric_charater, check_for_alphanumeric and 1001 more variants. If you *DID* hear about such function, 90% that in your previous, non-PHP life it was called isalpha. So if you make the name stay as it is, most chances are you save one manual lookup for experienced user. So, naming function "isalpha" did not make unwashed user's position worse, while made experienced user's position better. 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. 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? 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? More guessing? Did you already look in the manual? I bet you did. And underscores didn't help you. RC>> uses both mysql and postgres, and it's an ongoing hassle to not only RC>> switch the family name (pg/mysql), but to also switch out other names RC>> because of a lack of consistency, and never be quite sure what the RC>> right thing to do actually is. 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? -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115

« previous php.dev (#47662) next »