Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #23890

Re: Indentation styles

From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Indentation styles
Date 2013-05-07 10:56 -0400
Organization A noiseless patient Spider
Message-ID <kmb4h3$mnj$1@dont-email.me> (permalink)
References <rationale-20130507160938@ram.dialup.fu-berlin.de>

Show all headers | View raw


On 5/7/2013 10:23 AM, Stefan Ram wrote:
>[...]
>    An indentation of just one space often is too small to be seen
>    clearly, because the natural width and form of characters
>    often varies by an amount that is not very much smaller than a
>    space. Therefore, the indentation should amount to at least
>    two positions. In order not to waste horizontal spaces, an
>    indentation of exactly two positions is chosen. This means,
>    that the left position of the next level is two larger than
>    the position of the directly enclosing level.
> [...]

     I dimly recall reading, long ago, of someone's actual attempt
to measure the readability of different indentation widths.  Alas,
I can no longer find the reference.  I believe, though, that the
experiments found two spaces too narrow, four spaces too wide, and
eight spaces much too wide.

     Unfortunately, the remaining span includes two of the most
prominent and pervasive numbers of all, and there's no hint as to
which to use: The One True Best Indentation Width might be π or
it might be e, and I expect the religious debates on the topic
will rage endlessly.  Personally, I adopt a tolerant stance: Use
either e spaces or π spaces according to the teachings of your
faith.  Using anything else, though, would be heresy.  :)

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Indentation styles Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-05-07 10:56 -0400
  Re: Indentation styles Arne Vajhøj <arne@vajhoej.dk> - 2013-05-12 22:04 -0400
    Re: Indentation styles Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-05-12 23:21 -0400

csiph-web