Go to the FreeLists Home Page Home Signup Help Login
 



[haiku-development] || [Date Prev] [03-2008 Date Index] [Date Next] || [Thread Prev] [03-2008 Thread Index] [Thread Next]

[haiku-development] Re: coding style

  • From: Marcus Overhagen <marcusoverhagen@xxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 3 Mar 2008 11:22:27 +0100 (CET)
Axel Dörfler  <axeld@xxxxxxxxxxxxxxxx> wrote:

> * use column style for classes
agreed

> * don't indent public/private (saves a tab)
agreed

> * use "char* variable" instead of "char *variable" in C++ code

I disagree with that one. The * belongs to the variable, not to the type.

I think we should use, depending of indention used:
char *variable;
and for column style indention
char *          variable;
but NOT
char* variable;

> * don't use ", fMyMember(...)" initializers (my greetings to Stippi ;-
> )), but "fMyMember(...),"
Putting the the first ; and the , befor the variable looks nicer
(and is easier to exend). I would really like to keep that style.

another thing:
I would like to have the opening curly bracket of a class or struct definition
on the next line, as we do when defining functions:

class Foobar
{
public:
                       Foobar();
                       ~Foobar();
    char *          String();

private:
    int                fNextName;
};


> Does that make everybody happy somehow? :-)
It's not easy to find a consensus, this probably needs some more discussion.



Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr 
Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und optional 
60 Pay TV Sender, einen elektronischen Programmführer mit Movie Star 
Bewertungen von TV Movie. Außerdem, aktuelle Filmhits und prickelnde Erotik in 
der Arcor-Videothek. Infos unter www.arcor.de/tv





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.