[haiku-development] Re: coding style

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 03 Mar 2008 11:06:49 +0100

On 2008-03-03 at 10:19:28 [+0100], Gabriele Biffi <mlist@xxxxxxxxx> wrote:
> Axel Dörfler wrote:
> > * use column style for classes
> > * don't indent public/private (saves a tab)
> 
> That's what I do in my code, so I vote for these :-)
> 
> > * use "char* variable" instead of "char *variable" in C++ code
> 
> I think "char *variable" is better, because if you write "char* 
> variable1, variable2" can be confusing (variable2 isn't a pointer).

This has been discussed many times. It is more logical to do "char* 
variable", since "variable" is the name and "char*" is the type. We all 
know about the case you point out, but this listing of variable names is 
forbidden in our coding style anyways. You have to do this:

char* variable1;
char variable2;


> > * don't use ", fMyMember(...)" initializers (my greetings to Stippi ;-
> > )), but "fMyMember(...),"
> 
> I agree on that one, too.

I will be able to live with it. It is what I used to do before I saw Marcus 
doing the ", fMyMember(...)" thing, which I since find more practical and 
less likely to cause compile time errors when I rearrange stuff. It also 
looks better in diffs. But what the heck... if it means so much to Axel... 
:-)

Best regards,
-Stephan

Other related posts: