I put some comments of mine in here. If there are any sections I obmitted, 
that is my way of agreeing in silence.

On Sunday 24 June 2007 18:45, Erik Johansson wrote:
> > It shouldn't matter which way to write them but my vote is on /**,
> > mostly because that's the way I've already started commenting new
> > classes in the qt4-gui.
>
> +1 on /**.

+2

> Where it makes sense to add a reference, I'm all for it. But not to
> every bugfix.

Of course not all rules, but the ones that may help to read the code and why 
there are certain changes.

> > * Indentation in switch blocks should be described. As the 'case' lines
> > are only labels and not statements, some will not add an indentation
> > step for them but I think it improves readability.
>
> Fine by me. Feel free to add it to the wiki :)

I cringe at code that doesn't indent case labels. It just feels wrong.

> > * Global variables should be mentioned. Add the usual text that they're
> > evil and then describe a naming convention (if we have any) for the rare
> > cases when they are used anyway.
>
> The singleton pattern can be used in all places where we currently use
> globals, so my vote is on banning globals.

Yes for singletons, Nay for globals.

> > * The usage of NULL vs. using 0 should be specified. I remember
> > discussing this in #licq and I think it should be specified which to
> > use. (I still say that NULL is a C constant and that 0 is that thing to
> > use in C++ but I can accept 0 if that's what everyone else wants to use.)
>
> NULL for pointers, 0 for integers. (In gcc NULL is defined as a
> special symbol and not 0. So besides making it clear that something is
> a pointer, it can actually help catch mistakes. And, IIRC, the
> upcoming c++ standard will actually introduce null as a keyword.)

I don't like using macros unless absolutely necessary. And NULL is a macro, 
which makes it a hack to C++. I'm pretty sure even Stroustrup has said that 
he doesn't use NULL.

> > * Specify whether the following is good or bad:
> > if (x) return;
>
> Bad.

Actually, I like this. It is still easy to see, as long as you use some decent 
syntax highlighting. But anyways, if anyone has an opinion about it I can go 
with that, doesn't really matter to me.

Jon

-- 
________________________________________________________
Jon Keating                ICQ: 16325723
[EMAIL PROTECTED]               MSN: [EMAIL PROTECTED]
http://www.licq.org        GPG: 2290A71F
http://www.thejon.org      HOME: Minamiashigara, Japan

Reply via email to