On Dec 6, 2003, at 11:14 AM, Stefan Walk wrote:


On Sat, Dec 06, 2003 at 10:59:33AM +0100, Sebastian Bergmann wrote:
  PHP's internal *function names* should use _ to delimit between
  words.
[snip]
  And this what we should *consistently* adopt for the naming of PHP's
  internal *method names*.

Why should methods differ from functions in naming? That in itself is inconsistency...

I'm in favour of naming with underscores, simply because that was the
PHP way until now and it helps readability a lot.

This is not really true. In PHP4 there were very few internal classes, so there was not much of a standard for naming class methods. In contrast, PEAR has had a large amount of OO code in it and conforms to StudlyCaps. The whole user-space/internal differentiator argument is of course bogus because OOP relies on method overloading, so if you want to extend the internal classes in your userspace code, you are forced to adopt underscores as well.


It seems that most of the folks who are siding behind using underscores aren't very interested in using OO code, while the people who are using OOP extensively already support StudlyCaps. My opinion may be biased though.



But i guess the only solution that both parties will accept is dynamically removing all underscores from names when calling a function/method (that would clear up the strpos/str_replace etc inconsistency as well).

Huh? That's awful. Who supports that sort of magic?


George

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



Reply via email to