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

List:       kde-commits
Subject:    Re: KDE/kdepim/kleopatra/commands
From:       Marc Mutz <marc () klaralvdalens-datakonsult ! se>
Date:       2008-02-13 19:17:01
Message-ID: 200802132217.11322.marc () klaralvdalens-datakonsult ! se
[Download RAW message or body]

On Wednesday 13 February 2008 17:45, David Faure wrote:
> On Wednesday 13 February 2008, Marc Mutz wrote:
> > On Wednesday February 13 2008 16:59, Jarosław Staniek wrote:
> > > Hmm, after this change: if canceled == true, [2] is executed.
> > > Before the change, [1] was executed.
> >
> > Read again :)
>
> It's still ambiguous when reading and {} would make it much clearer.
>
> "if if else if else" is definitely not clear to the average reader (me
> included), while explicit "{...}" cannot hurt.

It is, if you see the indention. And the extra parentheses do hurt, if they're 
not needed. C++ has enough visual clutter, let's not make it worse by this 
backwards "always use {}, even if you don't need it, since some stupid 
maintenance programmer might add a new line and change the meaning of the 
program" rule.

Thanks,
Marc

-- 
Marc Mutz -- marc@klaralvdalens-datakonsult.se, mutz@kde.org
Klarälvdalens Datakonsult AB, Platform-independent software solutions

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

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