The D Style and tab sizes

Regan Heath regan at netwin.co.nz
Sun Sep 10 15:08:21 PDT 2006


On Sun, 10 Sep 2006 11:15:02 +0100, Steve Horne  
<stephenwantshornenospam100 at aol.com> wrote:

> On Sun, 10 Sep 2006 00:47:21 +0100, Stewart Gordon
> <smjg_1998 at yahoo.com> wrote:
>
>> "# Hardware tabs are at 8 column increments.
>> # Each indentation level will be four columns."
>>
>> Firstly, what is a "hardware tab"?  Secondly, these two quotations seem
>> contradictory.
>
> "Soft tab" usually means indent levels done in spaces. Any decent text
> editors will insert spaces when you press the tab key these days.
> "Hard tab" means the ASCII tab character, which is evil.

It's not evil, it's miss-understood. If you use it for it's original  
purpose (IMO, to define your left hand margin) and nothing else, it works  
perfectly in every text editor. Granted in an editor which cannot define a  
tab width of anything other than 8 it will use a lot of horizontal space,  
likewise printing(*) to paper or a console.. but I think it would be fair  
to say "very few people do that sort of thing these days" and if you do,  
should you be allowed to force your coding style on others (for any public  
source/project), I think not.

(*) Unless the editor is smart enough to translate \t into the specified  
number of spaces when printing. An operation made trivial by the existance  
of the \t character instead of some random number of spaces!

Regan



More information about the Digitalmars-d mailing list