[OT] Auto code reformating / one coding style enforcment.
Oskar Linde
oskar.lindeREM at OVEgmail.com
Mon Aug 14 09:24:05 PDT 2006
Unknown W. Brackets wrote:
> In my code, I use hard tabs for everything and set my tab-width to 4
> spaces.
>
> I've never had trouble with printing code (something I do less often
> than have birthdays, mind you) nor any text editor displaying my code
> weirdly.
>
> Some people hate hard tabs, because they just have to line things up
> after a non-tab character with tabs. I think this is a Bad Thing (TM),
> but if you have to do it, I understand using spaces.
>
> But I've never seen a case where a program would misbehave if the tab
> width was not set to 8.... I just can't wrap my head around the benefit
> of using both tabs *and* spaces.
This is how Emacs works and has worked for ages. Tabs are not directly
used for indentation, but rather for optimizing the number of spaces
needed. I guess at some time in the past, those 7 bytes saved here and
there were well worth it. It would probably improve output speed on old
teletypes and save memory at the same time. Those old teletypes could
not redefine the tab stops anyway (well, I know the modern vt100 could,
but not the vt52 afaik), so any other use for the tab character wasn't
realistic.
Today, the benefits are not as clear... :)
/Oskar
More information about the Digitalmars-d
mailing list