Re: cvs: php4 /ext/msession msession.c

From: Date: Sat, 22 Dec 2001 21:28:10 +0000
Subject: Re: cvs: php4 /ext/msession msession.c
References: 1 2 3  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8775@lists.php.net to get a copy of this message
At 04:10 PM 12/22/2001 -0500, mlwmohawk wrote:
- | DO NOT rename my variable names |
ok, this wasn't very clever (to much to soon), but we usualy do not use those type encoding characters in front of variable names (although there is no written rule here), and the string handling in the new parameter parsing function made me finally change this as having a 'int ihost_len;' besides 'char *szhost;' didn't look readable and intuitive to me at all Intuitive is subjective. Let us not all try to rewrite everyone's code that it is intuitive to ourselves, shall we? Lets take steps to understand and respect each other's code. We all have different styles. I have been programing professionally since 1982, I have a style that works for me. With a little practice the "Hungarian" notation is VERY usefull practice. Again, I do not wish to sell you on Hungarian notation, I just wish you to keep your personal tastes to your code and I'll keep mine to my own. When I edit the code of others, I try to understand their naming, their style, and their format. I try to make any mods that I would make fit in. It is a matter of professional respect.
- | DO NOT reformat by braces, if you don't like the way I brace my code | - | too bad. I take strides to follow the format that other authors use |
php4/CODING_STANDARDS, Syntax and indentation, Section 2: [2] Use K&R-style. Of course, we can't and don't want to
     force anybody to use a style he or she is not used to, but,
     at the very least, when you write code that goes into the core
     of PHP or one of its standard modules, please maintain the K&R
     style.  This applies to just about everything, starting with
     indentation and comment styles and up to function declaration
     syntax.
"of course we can't and don't want to" is the operative phrase. Open source is a chaotic environment. If you are intolerant of the different styles of others, you will find that people will find it more trouble than it is worth to contribute. BTW, mine is not the only extension that brackets code with the opening bracket on a new line. At least mine is consistent.
I'll make it short because I need to go and I don't want to create another long thread. PHP has a coding standard which is a good thing. It's not very good to have every extension in PHP to have a completely different style especially as it makes it easier for people to contribute in different portions of the code. It's not a matter of who's style is right or wrong. We have decided on a standard and you should follow it. Please don't make it a big deal saying it'll make it hard for you to contribute. An experienced coder like you can get used to how we code in PHP within a few minutes. It's not a big deal to remember that in this project you have to do x, y and z. I have programmed in different projects, where each of them has had a different standard. I can easily switch according to the project. In the long run it's in the interest of PHP to have a consistent source tree. Try not to take it so hard and just try and stick to the standard as much as possible. It's really not such a big deal. Thanks, Andi

« previous php.cvs (#8775) next »