Re: Function names
| From: | Rasmus Lerdorf | Date: | Tue, 11 Dec 2001 17:22:12 +0000 |
| Subject: | Re: Function names | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-73036@lists.php.net to get a copy of this message | ||
And in the process we would break thousands of scripts. We would
therefore have to maintain the old function names and create a new version
of each one and thereby clutter the function namespace incredibly to the
point where we will stand a huge risk of also breaking existing code by
stepping all over existing user-space functions.
strstr() is haystack,needle because the libc function of the same name is
that way. The [ep]reg_* functions are the way they are because it just
makes sense to make the regex the first arg and the underlying functions
they are based on have the regex as the first arg.
-Rasmus
On Tue, 11 Dec 2001, Jonas Delfs wrote:
> 10-12-2001 18:42 you wrote:
> > > > Nope, there are no plans to change the names of the base functions
> in
> > > PHP.
> > >
> > > I'm a little new to this list so just say if you have discussed this
> in
> > > the latest past, but wouldn't it be an idea to name function after
> which
> > > library they're in?
> >
> > Not really. Especially since fopen() is not in a library at all.
> There
> > is no file library.
>
> In my last mail i forgot to mention that another big purpose of this
> 'making-function-calls-more-logic'-thingie is to make some rules for
> argument-placing so that fx. all functions that needs to get a
> 'haystack' and a 'neddle' always get the haystack first. Right now
> str(i)str() does this, but ereg(i)() have switched theese.
>
> --
> Mvh./Best Regards
> Jonas Delfs, http://delfs.dk
>