[haiku-development] Re: [haiku-development]

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 23 Oct 2007 14:31:28 +0200

Fredrik,

just to be absolutely clear: Your work is very much appreciated, so don't 
worry too much when I or someone else makes comments about coding style!

Fredrik Modéen wrote (2007-10-23, 13:03:51 [+0200]):
> "Fredrik -> please have a look at our coding guidelines, also you have 
> weird whitespaces in your patches... :-)"
> 
> I have read Haiku coding guidelines twice or three times before that 
> patch. I have looked at pe and it uses 4 spaces for a tab, so I would 
> like to know where those white spaces are?

A couple of lines contained spaces instead of tabs, I didn't see a pattern 
to it though. What editor are you using?

> My first patch to media player did bake some coding guidelines but what 
> did this patch brake?

if(...){
}else{
}

->

if (...) {
} else {
}

That was the only other thing. One thing which is not in the coding 
guidelines, but which at least Axel, Ingo, I and I think a few more devs 
have been doing now is to attach pointers/references to the type name:

SomeFunction(const BString* name);

instead of 

SomeFunction(const BString *name);

We find it is more logical, because the "BString*" is actually the type of 
"name". (I know about "char* a, b;", but that's discouraged anyways...)

Best regards,
-Stephan

Other related posts: