Re: braces needed?
From: lilburne (lilburne_at_godzilla.net)
Date: 01/31/04
- Next message: Jonathan Turkanis: "Re: braces needed?"
- Previous message: Haximus: "Re: Any progammers looking for a killer app to develop? How about a voice enabled forum?"
- Next in thread: Jonathan Turkanis: "Re: braces needed?"
- Reply: Jonathan Turkanis: "Re: braces needed?"
- Maybe reply: Old Wolf: "Re: braces needed?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 31 Jan 2004 21:14:42 +0000
Jonathan Turkanis wrote:
> "Jack Klein" <jackklein@spamcop.net> wrote in message:
>
>>
>>There is just too much chance for error, not only when writing the
>>original code, but even more so later when the code is modified for
>>defect fixing or upgrade.
>>
>
>
> Certainly requiring braces seems to have wide acceptance, but your
> statement is an exaggeration. Glancing quickly through the standard,
> the Dinkumware standard library which ships with VC7.1, and the Boost
> source, I find numerous uses of 'if' without braces. Generally the
> meaning of such code is immediately clear.
>
Perhaps they don't have coding standards, or neglect them
from time to time. Our coding standard requires braces
around all control statements and even 'outlaws' single line
variants:
if (a < b) function();
for (int x = 0; x < y; ++x) function();
yet from time to time you'll find such examples in the
codebase even written by the originators of the standard.
They get to fix it.
- Next message: Jonathan Turkanis: "Re: braces needed?"
- Previous message: Haximus: "Re: Any progammers looking for a killer app to develop? How about a voice enabled forum?"
- Next in thread: Jonathan Turkanis: "Re: braces needed?"
- Reply: Jonathan Turkanis: "Re: braces needed?"
- Maybe reply: Old Wolf: "Re: braces needed?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|