Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Nov 2002 06:48:00 +0100
From:      Cliff Sarginson <cls@raggedclown.net>
To:        freebsd-chat@FreeBSD.org
Subject:   Re: Style(9) question
Message-ID:  <20021123054800.GB10380@raggedclown.net>
In-Reply-To: <20021123020701.GA24845@dogma.freebsd-uk.eu.org>
References:  <20021122193040.GA23078@dogma.freebsd-uk.eu.org> <XFMail.20021122160808.jhb@FreeBSD.org> <20021123020701.GA24845@dogma.freebsd-uk.eu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 23, 2002 at 02:07:01AM +0000, Jonathon McKitrick wrote:
> On Fri, Nov 22, 2002 at 04:08:08PM -0500, John Baldwin wrote:
> | The reason to not put them in is to avoid wasting screen real-estate
> | on mostly blank lines.  You also errantly assume that you will always
> | come back and add more statements later. :)
> 
> Ah, good answer.  Thanks!
> I always preferred it this way, but most on my team use the braces.
> 
Is it a good answer ? I find it an incredible one !
I don't actually use braces on a single-liners, so I am not arguing
either way - although theoretically I think it is probably a good idea.
But I learnt "C" out of thw white-book many years ago and I generally
write in the style found there (with a few exceptions ...:) 

But I really cannot believe that the reason is space on the screen !
I would be more likely to believe it was just someone's decision, not
necessarily with a rationale behind it. Maybe it was valid when code
was written on DecWriters using ed(1).

Having been involved in writing style guidelines they are always a
compromise, the cause of many heated debates and disgruntled people.
Indentation levels is another one people go into apoplexy over as well.

Well my feeling is you need a set of style rules that people, however
grudgingly have to accept for new source modules. If you are updating
existing code I think it is only sensible to follow the style that the
particular code uses. This is a practical matter, is it worth the time
to re-arrange exisisting code (with there always being the chance of
introducing new bugs by mistypes) ?

Either that or insist all programs are post-processed through a "C"
beautifier. Although I have yet to ever see one that deserves the word
beauty in it's description.

-- 
Regards
   Cliff Sarginson 
   The Netherlands

[ This mail has been checked as virus-free ]

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021123054800.GB10380>