[erlang-questions] Controversial subject of the day: tabs and spaces for indentation
Richard A. O'Keefe
ok@REDACTED
Tue Feb 11 22:55:57 CET 2014
On 11/02/2014, at 7:16 PM, Bengt Kleberg wrote:
> Is it not difficult to preserve alignment when using both variable width
> characters and fixed width characters tools?
I understand the question to be:
- some tools (group G) display program source code using
monospaced fonts
- some tools (group E) display program source code using
proportional fonts
- without any reference to TAB characters,
- surely it is difficult to write neatly aligned files
that display reasonable in both sets of tools?
To which the answer is "yes, certainly."
That's why I classified the tools as G(ood) and E(vil).
If you don't care about lining things up in a tabular way
to reveal common structure, then "blind" group E tools may
work for you; you won't _have_ any alignment that you care
to preserve, so group G tools will also work for you.
If you want proportional fonts AND you want neat tabular
formats, then you need some kind of "smart" group E tool.
For example, you might want to write your code in
Microsoft Word -- don't laugh, I've known it done -- using
its facilities for managing tabulation, and have the code
automatically extracted from the text, using a "code" style
to mark the chunks you want.
In that case, of course, you don't greatly care about
alignment in the raw code, so don't worry about preserving it.
More information about the erlang-questions
mailing list