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

From: Date: Sun, 23 Dec 2001 01:29:49 +0000
Subject: Re: cvs: php4 /ext/msession msession.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8781@lists.php.net to get a copy of this message
> Hello, > > > -----Original Message----- > > From: mlwmohawk [mailto:mlwmohawk@mohawksoft.com] > > Sent: Saturday, December 22, 2001 4:10 PM > > To: Hartmut Holzgraefe > > Cc: php-cvs@lists.php.net > > Subject: Re: [PHP-CVS] cvs: php4 /ext/msession msession.c > > > > ... > > > > 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. > > > > Well, more than one person has write access to the CVS repository. In my > oppinion, once you have committed your code, it is no longer "yours." It > is the project's. I think that you should respect the rest of us and > comply with the coding standards that the majority of the PHP code is > written in. Although you may be the primary maintainer, there is going > to come a day when someone besides you takes a look at the code and makes > a change or two. You should get used to that and accept it. If you > don't want other people scrutinizing your code and making changes to > create uniformity in the code, the don't contribute code. Simple > solution. > I respectfully disagree -- within PHP there are two types of code, extension code and core code. If you commit code to PHP's core, then yes, *expect* it to be changed to fit along with the style of PHP. That's fine, I'm not going to stop anyone from reformatting that code. Extensions are quite near self-contained programs, and if an author/maintainer prefers a certain style for his code, that's his perogative, because chances are he's going to be do 90-95% of the work on that file (at least), especially with the msession code, which a) isn't that big b) isn't (yet) that widely implemented While I don't think he should've been as forceful with the note (discussed via pm), as he said he was tootin' mad (I love that phrase :)... An extension author should still have the right to maintain a certain style for their code, simply because, they're the ones who get annoyed by, errm, reports from, users and again, they're the ones who maintain the code. > > > > > > > - | 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 think that "when you write code that goes into the core of PHP or > one of its standard modules, please maintain the K&R style" is the > operative phrase. > > Plenty of open source projects will not accept code unless it is > in their format. The Apache group is a perfect example of this. I > don't believe that PHP should be any different. > Well, this isn't in the core of PHP, nor is it one of the standard modules -- so that segment of the guidelines doesn't really apply. Anyhow, PHP is not Apache, the equivalent concept of a PHP extension is an apache module, and Apache is much more exclusive about what type of extensions it distributes, most of the apache modules are available externally, and rarely follow apache's coding guidelines. -Sterling

« previous php.cvs (#8781) next »