[erlang-questions] Controversial subject of the day: tabs and spaces for indentation
Jesper Louis Andersen
jesper.louis.andersen@REDACTED
Tue Feb 11 10:56:54 CET 2014
The acme text editor (from plan9) uses a variable width font by default.
There are several advantages to this, including easier to read text and
better horizontal width of text. Let us see how it interprets tabs:
"Tab intervals are set to the width of 4 (or the value of $tabstop) numeral
zeros in the appropriate font."
So a tab is interpreted as the length of 4 '0' characters in the font you
have chosen. This makes it impossible to align data by default, which
frankly is quite liberating. You stop caring about such stuff[0].
The general rule is that you can't make assumptions about how people will
render data in a file.
[0] I do have a monospaced font which I can switch to when it becomes
necessary.
On Tue, Feb 11, 2014 at 10:50 AM, Loïc Hoguin <essen@REDACTED> wrote:
> Alignment is *impossible* with fonts with variable width characters. And a
> few editors have such a font by default. That's a good point. If you do
> alignment, then your code will look bad for some people.
>
>
> On 02/11/2014 10:41 AM, Bengt Kleberg wrote:
>
>> Greetings,
>>
>> I thought more of aligning difficulties given variable width characters
>> and fixed width characters in different programs/tools. No tabs
>> included.
>>
>>
>> bengt
>>
>> On Tue, 2014-02-11 at 10:20 +0100, Anthony Ramine wrote:
>>
>>> No need to mix anything, it is hard to preserve in presence of any
>>> tab.
>>>
>>> --
>>> Anthony Ramine
>>>
>>> Le 11 févr. 2014 à 07:16, Bengt Kleberg <bengt.kleberg@REDACTED> a
>>> écrit :
>>>
>>> Greetings,
>>>>
>>>> Is it not difficult to preserve alignment when using both variable
>>>>
>>> width
>>>
>>>> characters and fixed width characters tools?
>>>>
>>>>
>>>> bengt
>>>>
>>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
> --
> Loïc Hoguin
> http://ninenines.eu
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
--
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140211/ecc78e17/attachment.htm>
More information about the erlang-questions
mailing list