indent style for D

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Jan 29 14:23:57 PST 2012


On Sun, Jan 29, 2012 at 10:47:55PM +0400, Denis Shelomovskij wrote:
> 29.01.2012 22:07, Stewart Gordon пишет:
> >It is. But mishmashing tab and space indentation causes far worse
> >conflict.
> >
> >Iain - I take it you meant that mishmashing, combined with users
> >having different tab size settings, causes a problem. Correct?
> >
> >Stewart.
> 
> Looks the reason against tabs is: mixed tabs and spaces is bad. So we
> should use spaces.
[...]

My opinion is that there is no problem if you indent with tabs, with
spaces only added to the end of the run of tabs if necessary. Comments
and code never mix on the same line.  This way, no matter what how wide
you set your tab stops to, things will always line up correctly.

(Sadly I don't follow this rule 100% of the time...)


T

-- 
Без труда не выловишь и рыбку из пруда. 


More information about the Digitalmars-d mailing list