On Dec 28, 2013 1:58 PM, "Yasuo Ohgaki" <[email protected]> wrote:
>
> Hi all,
>
> I know this has been discussed before, but I'll try again.
> We have following coding standard
>
> 1. Function names for user-level functions should be enclosed with in
> the PHP_FUNCTION() macro. They should be in lowercase, with words
> underscore delimited, with care taken to minimize the letter count.
> Abbreviations should not be used when they greatly decrease the
> readability of the function name itself::
There are a couple of solutions to this problem.
1. Change all the existing functions signatures. Bad idea per se as we can
forget any fast adoption, if any at all. Will be very painful to migrate
existing code
2. Add aliases all around.
Not a big fan of that one either. It clutters the php NS a lot without
factual gains
3. Try to implement nickic's prototype to add methods to scalar related
types, should work with complex types as well
I would prefer to give 3. a try, while it could be tricky to implement a
technically acceptable solution.
Pros:
. It will bring consistent APIs
. does not add dozen of aliases for little gains
. fully BC
. fits more to current development habits
Cons:
. still have to be careful by designing the new "methods"
Cheers,
Pierre