delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/07/13:15:32

Date: Thu, 6 Apr 2000 13:09:18 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: james archer <snowphoton AT mindspring DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Bracketing: A Matter of Style
In-Reply-To: <38EBD03D.895D1680@mindspring.com>
Message-ID: <Pine.SUN.3.91.1000406130901.3003H-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 5 Apr 2000, james archer wrote:

> int main(void)
>     {
>     printf("Hello, World!");
>     return 0;
>     }
> 
> That seems to me to be the most logical way to do it, for a variety of
> reasons:
> 
> 1) The function is clearly visible, instead of being obscured, because
> it is the only thing on the far left.  This may seem trivial, but it
> makes it much easier to skim through code looking for a particular
> function.

If you use a decent editor with syntax highlighting, it will paint the
functions in special color that is easily seen at a glance.

For example, I setup Emacs so that it paints function names in
light-red color that immediately stands out in any program.

So visibility should not be such a major factor in choosing the
indentation style.

In general, indentation is a matter of personal preferences, although
the style you use is against what most people seem to prefer.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019