Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #23890
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Indentation styles |
| Date | Tue, 07 May 2013 10:56:51 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 29 |
| Message-ID | <kmb4h3$mnj$1@dont-email.me> (permalink) |
| References | <rationale-20130507160938@ram.dialup.fu-berlin.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Tue, 7 May 2013 14:53:23 +0000 (UTC) |
| Injection-Info | mx05.eternal-september.org; posting-host="0d73d8cc209bff1c6395088b400d0605"; logging-data="23283"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KR6w3DGjGXR73cYEF+ZVo" |
| User-Agent | Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 |
| In-Reply-To | <rationale-20130507160938@ram.dialup.fu-berlin.de> |
| Cancel-Lock | sha1:n03hRHXoZimu95TMvTjzdU4j9y4= |
| Xref | csiph.com comp.lang.java.programmer:23890 |
Show key headers only | 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 | Next — Next in thread | Find similar | Unroll 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