[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdelibs/kdecore
From:       Frerich Raabe <raabe () kde ! org>
Date:       2007-01-15 10:11:17
Message-ID: 200701151111.17931.raabe () kde ! org
[Download RAW message or body]

On Sunday 14 January 2007 22:38, Thiago Macieira wrote:
> Well, the internal TT coding guidelines said: don't use the comma
> operator.
>
> It's quite easy to write:
> 	QObject *obj1 = something(),
> 		obj2 = somethingElse();
>
> and lose quite some time trying to find out why that doesn't work.

Hmm, is that really the comma an operator, or is it merely a separator? I 
don't know the C++ grammar too well but I think in that case, it's not a 
variable assignment, it's an initialization (and somehow I suspect that makes 
a difference). Unfortunately a bit of googling always only shows variable 
assignments (either like 'o = (i=3, p=4);' or in a for loop), and I don't 
want to dig into the C++ grammar now to find out whether that comma is a 
separator or not. :-)

- Frerich
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic