"Jani Taskinen" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> On Sat, 13 Aug 2005, Marco Tabini wrote:
>
>> Or maybe so that you don't have to look at the manual fifteen times a 
>> minute
>> so that you can remember whether the needle goes before the haystack in a
>> particular function or not.
>
>     I'm all for making this consistent all around.
>     Best way to get this done is propably to first come up
>     with a list of functions which are inconsistent?
>     And get a concensus over it. :)
>
>     This is the first one that comes to my mind:
>
>       int strpos (string haystack, mixed needle [, int offset])
>
>     Whenever I've used that, I've ALWAYS mixed the needle with haystack.
>     Same goes with every str* function, I guess..
>
>     --Jani

I think PHP 6.0 provides an excellent opportunity to rectify a huge number 
of frustrating inconsistencies; it would be a shame not to make the most of 
this.



The two biggest inconsistencies raised by users and "language comparison" 
groups are a) function argument order, and b) function naming.



Granted, swapping the arguments will be nightmarish for the users. However, 
we have a long time to discuss possibilities to alleviate the problem. I 
agree with Jani, a list of inconsistencies should be compiled and discussed.



If it is decided that swapping the function arguments around would be too 
cataclysmic for upgrading users, we should at the very least institute a new 
strict function naming policy.

My favourite example of inconsistency is htmlentities and 
html_entity_decode. These are easy to fix, and a relatively easy BC break 
for the user to deal with.


I suggest we extend Jani's previous suggestion; by including a list of 
function name inconsistencies in the discussion.





Kind regards,

Aidan Lister

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to