[erlang-questions] Off-topic: source code width and tab stops
Mon Mar 19 19:08:38 CET 2007
> On 16 Mar 2007, at 8:36 am, Vance Shipley wrote:
>> ok wrote:
>>> Source files should be kept to a maximum width of 80 columns;
>>A number of years ago I would have whole heartedly agreed
>>but no longer. A few years ago I did a project which used
>>ASN.1 and it ended up having really long names which I did
>>not have the luxury of choosing. It became impractical to
>>use 80 column pages. I did all my work in 132 column windows
>>for that project. I now find I really prefer working that
>>way as I have plenty of glass these days. I wouldn't however
>>unecessarily force others into it.
> The psychology-of-reading results really do seem to be clear this time -
> narrower columns really ARE easier to read.
Narrow columns of natural-language text are easier to read. For
programming languages, statements or expressions that have to be
split over more than one line are more difficult to read. The extent
of the difficulty, and the frequency of long lines, is programming
language-dependent. Unlike natural-language texts, *most* lines are
short regardless of the window width.
For C and Java, I find that a window width of less than 100 columns
is impractical. I haven't written enough in Erlang to come to a firm
conclusion in that case.
> I don't care what keys you press to make indentation happen (the TAB key
> in Emacs doesn't normally insert a literal tab; Vi uses > and < for
> changing indentation; Xcode uses Cmd-] and Cmd-[; &c). You could do it
> by clicking your teeth like castanets for all I care. But if you want
> other people to be able to look at your code and see what you see, any
> tabstops had better be 8 columns apart, and it is best of all if there
> are no tab characters in the file at all.
David Hopwood <>
More information about the erlang-questions