On Mon, Jul 07, 2003 at 08:34:07AM -0700, Brion Vibber wrote:
Have all delelopers agreed to this policy?
Me!
Sure that separation of stable and unstable is nice, but if test suddenly becomes, well, real code testing place, shouldn't we make some test2 just for playing with random code not necessarily meant for usage in real Wikipedias in predictable future ?
Why there aren't any coding rules specified (at leased somethin like: no more than 78 chars/line)?
If you'd like to write up a codification of our current code style, please do. Some of the basics:
function wfGlobalFunctionName( $notethespace, $anotherparam ) { # <-- indent with tabs global $wgSomeGlobalVar; doMyStuff( $wgSomeGlobalVar, $anotherparam ); }
class SomeClass { var $mMemberVariable; # Use get/setters if possible # very very short function can be on one line like this: function getMemberVariable() { return $this->mMemberVariable; } }
I would however counsel against the sort of cryptic local variable names in much of the older code, or the unnecessary duplication of code that should be refactored into functions or classes that can be shared.
Why not just: "The code should follow whatever is considered to be good practice, unless there are reasons to do it some other way". Wikipedia software isn't any special, so it doesn't need any special coding rules. And 78 chars / line was important 10 years ago, but is seriously too small for year 2003. Come on, we're all using hardware that easily allows over 120 chars per line, not ?