Newsgroups: comp.text
Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!tmsoft!eci386!woods
From: woods@eci386.uucp (Greg A. Woods)
Subject: Re: Are TABS bad?
Message-ID: <1991Apr2.222031.1603@eci386.uucp>
Reply-To: woods@eci386.UUCP (Greg A. Woods)
Organization: Elegant Communications Inc.
References: <DAVIS.91Mar24225932@pacific.mps.ohio-state.edu> <9336@castle.ed.ac.uk>
Date: Tue, 2 Apr 1991 22:20:31 GMT

In article <9336@castle.ed.ac.uk> yfcw14@castle.ed.ac.uk (K P Donnelly) writes:
> davis@pacific.mps.ohio-state.edu ("John E. Davis") writes:
> >  It seems to me that a tab character in a text file is a bad thing since
> >there is some ambiguity over what it means.
> 
> Hear hear!  I hate tabs.  I wish they had never been invented.  The
> operating system we use does not support tabs.  Every so often I get a
> mail message which looks a real mess - I now know to try writing it to a
> file and detabbing it, because it probably contains tab characters.

Then again, setting "standard" tabstops on your "terminal" would
probably "fix" your problem too.  Almost every sane terminal I've
dealt with defaults to fixed tabstops every 8 spaces, starting at the
first position (i.e. before any spaces).  Oh well, for those insane
terminals that keep creeping up there's a tty driver flag to cause tab
expansion.  [ Thank goodness this isn't comp.terminals, or I'd probably
get even more flames than I anticipate!  :-) ]

> We are starting to move to the Unix operating system.  It seems to me
> that tabs are used all over the place in Unix as a primitive file
> structuring mechanism.

Yes, and any sane person who uses tabs for such things follows the
same conventions as the sane terminals I outlined above.

What I hate about the way some people and programmes use tabs is when
they have a logical tabsize of, say 4, and yet they use tab characters
for 8-space physical fills.  Vi is especially prone to this abuse.

>  The tabs are usually invisible by default when
> files are displayed, and they add complication to all programs which are
> written to process text files.

Say what?  Yes, tabs are either expanded by the UNIX terminal driver,
or by the terminal itself.  Any programme processing text files should
treat tabs like any other character, such as space or newline.  Any
ambiguity can usually be removed by collapsing tabs and spaces into
one character (unless "empty" fields are allowed for some weird reason).

>  There is ambiguity about whether tabs
> are structuring elements or space saving devices.

Not if you are aware of the source of the file.  :-)

In general input, especially human generated input, to programmes is,
IMHO, best with tabs, and output, especially formatted (i.e. columnar)
output is best with spaces.
-- 
							Greg A. Woods
woods@{eci386,gate,robohack,ontmoh,tmsoft}.UUCP		ECI and UniForum Canada
+1-416-443-1734 [h]  +1-416-595-5425 [w]  VE3TCP	Toronto, Ontario CANADA
Political speech and writing are largely the defense of the indefensible-ORWELL
