[OT] Spaces/tabs (Was: simple display (from: GUI library for D))
Jonathan M Davis
jmdavisProg at gmx.com
Mon Apr 11 03:04:05 PDT 2011
> Am 11.04.2011 10:01, schrieb Jonathan M Davis:
> >> Jonathan M Davis Wrote:
> >>> Personally, I think that it's _horrible_ to use tabs
> >>
> >> Why would one fear tabs?
> >
> > They change depending on your editor settings. Indenting gets screwed up
> > if tabs and spaces are mixed. It's just plain annoying to have an
> > indentation of multiple spaces which isn't actually multiple spaces.
> >
> > The biggest problem though is that it just totally screws with
> > indentation if tabs and spaces are mixed and that invariably happens.
> >
> > Tabs serve no useful purpose IMHO.
> >
> > - Jonathan M Davis
>
> So tabs are horrible because some people use spaces instead of tabs.
I hate the very concept of tabs to begin with. The fact that they're variable
in size is _not_ something that I find to be desirable. Regardless of that
however, if you try and use tabs for indentation they invariably get mixed
with spaces, totally ruining whatever usefulness the tabs might have had. Code
will _always_ contain spaces. You can't reasonably write code with only tabs.
However, you _can_ easily and reasonably write code without tabs. Most code
editors can be set up such that all tabs are converted to spaces. So, if you
use only spaces, you can easily avoid the problem of tabs and spaces being
mixed. On the other hand, you _can't_ do the same by using only tabs. So, if
you do use tabs, you will end up with mixed tabs and spaces unless everyone
involved is very careful, which isn't going to happen.
So, I suppose that you could say that tabs are horrible because some people
use spaces, but I don't see any value in them to begin with anyway. However,
the fact that you invariably end up with mixed tabs and spaces when you try
and use tabs makes tabs completely useless. Every place that I've ever worked
at has gone for spaces only, and I've only ever heard of one place where it
was required that tabs be used for indentation. I'm sure that there are
others, but it's rare that I've heard of anyone thinking that using tabs in
code was a good idea.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list