Nicholas Clark <[EMAIL PROTECTED]> wrote:
> > =item *
> >
> > Uncuddled elses: ie avoid C<} else {>
>
> Does this mean avoid:
>
> if (...) {
> ...
> } else {
> ...
> }
>
> and instead use:
>
> if (...) {
> ...
> }
> else
> {
> ...
> }
>
> If my interpretation of what it means is cor
On Mon, 13 Aug 2001, Dave Mitchell wrote:
> Nicholas Clark <[EMAIL PROTECTED]> wrote:
> > Does this mean avoid:
> >
> > if (...) {
> > ...
> > } else {
> > ...
> > }
> >
> > and instead use:
> >
> > if (...) {
> > ...
> > }
> > else
> > {
> > ...
> > }
> >
> > If my interpretation of what
I believe the advantage of
> if (...) {
> ...
> } else {
> ...
> }
is to write very dense code, especially when the block itself is single
line.
This style may not be readable to some people.
This style is not very consistent,
> if (...) {
> ...
> }
> else
> {
> ...
> }
I believe it w
At 11:58 AM 8/13/2001 -0700, Hong Zhang wrote:
>This style is not very consistent,
> > if (...) {
> > ...
> > }
> > else
> > {
> > ...
> > }
>
>I believe it would better be
>
>/* comment */
>if (...) {
> ...
>}
>/* comment */
>else {
> ...
>}
Yes, absolutely. Being able to put meaningfull
> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:
>> BTW, I am not sure it has been mentioned already. We should enfore
>> {} even for single line block. Since we use plenty of macros that
>> may be expanded to multi lines, it is much safer and consistent
>> to always use {}.
DS>
Pardon me for butting in at this late stage :-)
Since the purpose of coding conventions and guidelines is to make code more
readable to the majority of developers, wouldn't it make sence to settle on
something that can be processed by a utility like gnu indent ??? This way
developers could use a