My Photos

www.flickr.com
This is a Flickr badge showing public photos and videos from coogle. Make your own badge here.

Quicksearch

PHP5: What do you Think of studlyCaps?

Tuesday, March 23. 2004

For quite some time now there has been a debate raging in the PHP Development (internals) community when it comes to a standard naming convention for new extensions that are standard in PHP5. These extensions all support a dual-syntax which allows them to be used in a procedural or object-oriented context... for instance:


<?php

$tidy = tidy_parse_file('myfile.html');
echo tidy_get_contents($tidy);

?>


or...

<?php

$tidy = new tidy();
$tidy->parseFile('myfile.html');
echo $tidy->value;

?>



The big debate that is going on is how the object-oriented side of things will be named. As you can read for yourself in this Huge thread on internals, there was a lot of flaming going back and forth regarding the use of studlyCaps. There were those that thought studlyCaps were "stupidCaps" and wanted methods to be named parse_file() instead of parseFile(). When it was all said and done studlyCaps seemed to have more favor, and so the decision was made to move to them.

Because of this decision I went through my Tidy extension and changed all of the method calls to the new studlyCaps convention. However, it recently came to my attention that neither SQLite nor MySQLi (two extensions which have a similar dual-syntax) changed. With RC1 just out the door, debate has again raged. On one hand, there are those who think establishing a consistent convention in these new extensions is very important and want to see them changed to studlyCaps. On the other hand, there are those who never liked studlyCaps to begin with and are fighting hard to keep the understore_method syntax, claiming that it will break people's code if its changed.

What do you, readers of this blog, think? Are you in favor of studlyCaps or not for methods? Regardless, do you think having a consistency is important and it should either be all one or all the other? If the API is changed, are your scripts going to break (have you been writing important code based on PHP 5 already?) Let's hear from you!


Bookmark PHP5: What do you Think of studlyCaps?  at del.icio.us Digg PHP5: What do you Think of studlyCaps? Bloglines PHP5: What do you Think of studlyCaps? Technorati PHP5: What do you Think of studlyCaps? Fark this: PHP5: What do you Think of studlyCaps? Bookmark PHP5: What do you Think of studlyCaps?  at YahooMyWeb Bookmark PHP5: What do you Think of studlyCaps?  at Furl.net Bookmark PHP5: What do you Think of studlyCaps?  at reddit.com Bookmark PHP5: What do you Think of studlyCaps?  at blinklist.com Bookmark PHP5: What do you Think of studlyCaps?  at Spurl.net Bookmark PHP5: What do you Think of studlyCaps?  at NewsVine Bookmark PHP5: What do you Think of studlyCaps?  at Simpy.com Bookmark PHP5: What do you Think of studlyCaps?  at blogmarks Bookmark PHP5: What do you Think of studlyCaps?  with wists Bookmark PHP5: What do you Think of studlyCaps?  at Ma.gnolia.com wong it! Bookmark using any bookmark manager!

Trackbacks

No Trackbacks

Comments
Display comments as (Linear | Threaded)

No comments

The author does not allow comments to this entry