Re: [Grouptime-developers] Coding Standard - is it ready?
Status: Pre-Alpha
Brought to you by:
sauanimal
From: Andrey H. <and...@ma...> - 2002-09-09 14:16:59
|
Hi, what about my proposals 1) to have C as prefix in the class names. 2)to use PHPDoc compatible comments - for file and functions. Constants will self explain them. 3)I see that there is no proposal for variable names : $some_var or $someVar. I think the former is better because the second is the way the methods are named. So by using the former it will be easier to track errors for using an property instead of calling method. ($s->updateThing vs $s->updateThing() ). 4)Strict typing : If one var is used as int it will be int to the end of the script. In conditions IMO it is better to use === and !== to check and type. Otherwise problems can be faced. Consider this : <?php $str_val = '0'; if ($str_val) echo "one"; else echo "two"; ?> This will output "two" no matter that strlen($str_val) is not 0. This is type juggling. So use === to check. 5)Casting : I prefer this : $i_var = (int)$some_str_val; Others are (string), (float) New ones : 1)POSIX regex(ereg_* ) or PCRE regex(preg_*) ----- Original Message ----- From: "Jan Urva" <ja...@ko...> To: <gro...@li...> Sent: Monday, September 09, 2002 6:08 PM Subject: RE: [Grouptime-developers] Coding Standard - is it ready? > Ok, changed some standards, some bugfixes, some additions. > > Is this acceptable for all: > http://www.realtime.ee/~sau/coding_standards.zip > > If something doesn't like, let us know, and I'll fix it. > > If now feedback havent received by the end of today 09.09.2002, 10pm GMT > 0, then I'll take that all agreed and I'll declare this doc for final. > > May the source be with you > Jan Urva > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > Grouptime-developers mailing list > Gro...@li... > https://lists.sourceforge.net/lists/listinfo/grouptime-developers |