Re: Resurrecting the Function Renaming Thread
| From: | Zak Greant | Date: | Thu, 08 Feb 2001 00:16:27 +0000 |
| Subject: | Re: Resurrecting the Function Renaming Thread | ||
| References: | 1 2 3 4 5 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-2328@lists.php.net to get a copy of this message | ||
Richard Lynch wrote:
> > 2.) Make function names consistent so that programmers
don't have to
> > remember that isset is the exception to the is_* type
functions.
>
> Like, I don't even consider isset() in the same category
as is_string(),
> is_array() etc.
>
> isset() is like empty()
>
> is_xxx asks what type of variable this is.
> isset asks if the variable even exists.
> Those are totally different kinds of questions.
>
> If I saw is_set(), I'd start looking for a new Type in the
language called
> 'Set' which would be kind of like an array, only different
somehow... Dunno
> exactly what I'd expect it to do differently from an
array, but that's what
> I'd expect.
>
> So, are we going to also change empty() to is_empty()?
That seems kinda
> goofy...
How about this instead: If you are used to using is_*
and you use isset it is
easy to accidentally use is_set instead. Is it
strreplace or str_replace, and
so on. The lack of consistency is a PITA.
--zak