Re: Re: Coding standards

From: Date: Fri, 21 Dec 2001 06:25:36 +0000
Subject: Re: Re: Coding standards
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-3626@lists.php.net to get a copy of this message
Manuel Lemos wrote: > I noticed that some C developers put the rules that they follow in the > form of vi directives in the bottom of their source code files. Similar > idea could be followed, maybe some custom XML tags in PHP comments, > something like this: > > /* > > <Style> > <Indentation> > <Type>Spaces</Type> > <Count>4</Count> > </Indentation> > <Capitalization> > <Type>InitialsExceptFirst</Type> > </capitalization> > <ScopeBraces> > <Position>Below</Position> > </ScopeBraces> > </Style> > > */ > > Why XML? Because it is easier to parse programatically and more flexible > to extend. Hopefully somebody will write a prettifier that will reformat > the code edited by somebody with a different style thus helping people > to write code to conform with the original contributor style rules. > That's a good idea. Perhaps a even more cool stuff could be if you can set up your "xml style conf" in your editor and the file you are editing appears in your style and only will be reformatted to the author style when you save the file. Anyway the naming (classes, functions, vars, etc) problem will persist. Tomas V.V.Cox

« previous php.pear.dev (#3626) next »