Pierre-Alain Joye wrote:
> On Wed, 03 Dec 2003 14:02:00 +0100
> Ulf Wendel <[EMAIL PROTECTED]> wrote:

>>Most PHP extension have a functional interface. If some extension will
>>become an OO API in the future this API should not differ from the
>>functional API. I don't see a good reason why I we should teach
>>everybody that the OO API uses different function (method) names than
>>the well known functional interfaces. No need to confuse everybody.
>
>
> A OO API can add many advantages or conveniences ways that are
> impossible to do with with a functionnal approach. New ways, new
> features, new names, nothing to make Jon Doo confused :)



>
>
>>There's enough inconsistency in the extension APIs. Do not introduce
>>even more breaks. Let the functional and the OO interface use the same
>>labels (as far as possible).
>
>
> Or drop the incosistencies instead of keeping them.

Ok, drop the studyCaps.

>>What about the existing extensions that do use studycaps (GD)? Do not
>>change them for backward compatibility. Allow them to keep their style
>
>
> This BC thingies in PHP5 sound always weird or silly to me (in most
> cases). Why in the world do we need a major release if on each case we
> have to take care of php4?

We do have to take care. Fear the installed code base.
>
>
>>for the functional an the OO API (if any). Finally try to replace the
>>entire extension with a new one.
>
>
> Which should be the case anyway, to use  the new engine features, if
> required.
>
> pierre
>
>
>


-- Suche neuen Job. Erfahrung: NetUSE AG Kiel (PHPLib), WWE Hamburg, http://www.ulf-wendel.de Pierre-Alain Joye wrote:

Hello,

On Wed, 03 Dec 2003 14:02:00 +0100
Ulf Wendel <[EMAIL PROTECTED]> wrote:
Is it really true that the entire OO-world uses study caps? C++ is a hybrid language somewhatlike PHP. As far as I know STL does not use study caps.


See Morioshy post (python as well), most of the langages with OO
features use studlycaps. STL..., well  ;-)

Well, shall we use spaces or tabs withing our code? I think most people preferr spaces...


It's not really who takes the one or the other way. I could easily argue against Python? "Phyton, sorry - I'm not talking anmimals. Java? I preferr tea an real computer languages like C++".

In the end it boild down to a a matter of personal taste. I can arrange myself with both naming conventions.

Most PHP extension have a functional interface. If some extension will
become an OO API in the future this API should not differ from the functional API. I don't see a good reason why I we should teach everybody that the OO API uses different function (method) names than the well known functional interfaces. No need to confuse everybody.


A OO API can add many advantages or conveniences ways that are
impossible to do with with a functionnal approach. New ways, new
features, new names, nothing to make Jon Doo confused :)

I'm not arguing against OO interfaces. I'm requesting consistency with existing APIs.


There's enough inconsistency in the extension APIs. Do not introduce even more breaks. Let the functional and the OO interface use the same
labels (as far as possible).


Or drop the incosistencies instead of keeping them.

That's what I'm suggesting when it comes to new extension. Leave the old extension untouched for BC, try to rewrite it and convince people that you've done a good job. Such a good job as Georg (Richter) did with the mysqli extension.


But: leave the old (current) extension untouched. As Hartmut said BC is a strength not a weakness. Fear the installed code base and be very careful with API changes. Be extremly careful with changes that are caused by a discussion on "tastes".

However this is not why I raised my voice. I'd like PHP to keep it's underscore-delimited lowercase identifiers for all kind of build-in functionality. It helps me reading and understanding my souce. All my PHP functions use studyCaps. Most build-in stuff uses underscores.

This rule should be useful for beginners as well. Whenever you see a function (method) that uses underscores look it under php.net/function_name. It does not matter if it's a function or method, look it up under php.net/function_name. Whenever you spy a function (method) that uses studyCaps, try to find it's documentation on pear.php.net or...

Ulf

--
Suche neuen Job. Erfahrung: NetUSE AG Kiel (PHPLib),
WWE Hamburg, http://www.ulf-wendel.de

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



Reply via email to