On Mar 26, 2004, at 9:38 AM, Ilia Alshanetsky wrote:


On March 26, 2004 09:35 am, you wrote:
So one would inherit from/extend a native class and then use studlyCaps and
call underscore style methods from parent class. Can you imagine how ugly
would this look?

It may look ugly, but without a doubt it would be very clear which code is
'user' and which is 'PHP'. Ugliness in general makes code difficult to read,
in this case (IMO) it actually makes the situation a little clearer.

As Edin and Lukas have both pointed out, one of the major precepts of OO programming is that you can (and often do) overload methods in your parent. Adopting two different styles really doesn't work if you ever want to use any of the in-core classes, as it will force your own code to adopt both notions. In fact, the argument that people use StudlyCaps in their own code is precisely why it should be adopted in OO code, so that overloading won't result in a mishmash of styles.


George

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



Reply via email to