From: cantor@star.enet.dec.com (Dave Cantor)
Subject: Re: damn tabs
Organization: Digital Equipment Corporation
Date: Mon, 12 Oct 1992 14:47:46 GMT



In article <Bvy2JA.4FA@ddsw1.mcs.com>, dattier@ddsw1.mcs.com (DWT), replying
to <annius.718533231@freyr>, annius@sif.research.ptt.nl (Annius Groenink),
wrote:
> 
>Tabulation was invented for aligning columns of tabular text, and its adap-
>tation for indenting structures in programming code came many decades later.

Yes.  But not for computers.  For typewriters.  I'm not saying that tabulation
on computers WASN'T originally used for aligning columns of text, but
tabulation originated with typewriters, and it was mechanical.

>Columnar tabulation and structure indentation ought to be two separate
>concepts with two different sets of terminology, but any given text is
>likely to need only one or the other.

I agree with the proviso that insertion of code (requiring structure
indentation) might occur in the same document ("file") with tables (requiring
columnar tabulation).

>The originator of eight-column tab stops wasn't "stupid," but he or she was a
>typist, not a programmer, and probably died without ever touching a computer.

Probably.  But tabulation was invented for typewriters, not computers.

I haven't used a modern, computer-driven typewriter.  The last typewriter
I used was electromechanical (an "electric typewriter"), and I used purely
mechanical typewriters before that.  On those kinds of typewriters, the
purpose of the TAB key was to move the carriage (or the type ball) to the
next TAB STOP.  Tab stops could be set by mechanical means at any or all
positions.  

*DISCLAIMER*
The following is not wholly the truth, nor is it the whole truth.  This
is my personal guess of a Brief History of Tabulation Characters in Computing.
There is some truth mixed in.  If you quote this, please recognize that I
wasn't representing this to be actual historical fact.
*END OF DISCLAIMER*

In earlier days, electric typewriters were adapted for use as computer output
devices (they were used for input, too, but that's not relevant right now). 
Characters were needed to cause the typewriter to perform certain functions,
such as return the carriage (or ball), index, back space, and tabulate. (I
recall on the IBM 1620, there were no characters for these functions, but
there was a special instruction to cause control signals to be sent.  On the
CDC 6400, you had to depress a special console key in order to transmit the
tab, return, and index codes on input--without the special console key, those
functions were local only.)

The characters which caused electric typewriter functions eventually started
being stored in files, and at first there was no confusion.  If you output
a tab character, the device which received it would tabulate if it had that
capability.  If it didn't, then nothing would happen, or there'd be an
error condition.   

Then software interpretation of tabs was invented.  Different people (and 
companies!) had different conventions about what are tab meant.  On output,
in some places it meant send an actual tab character; in some places, send
a space; in some places, send a fixed number of multiple spaces; in some
places, send enough spaces to get to the next virtual tab stop (virtual
because the position on the line was kept in software).  Where tab stops
were used, there was variance between using a fixed number of spaces between
them, and somehow allowing them to be set, sometimes on a file-by-file
basis.  Even where there was a simple fixed number of spaces between stops,
there could be variation.  For example, a null character caused no movement
and no character to be represented (no head movement), but in some places,
it was counted against the position of the next tab stop, and in some places
it was not.

On input, editors could interpret the tab character as meaning insert the
right number of spaces, or they could interpret the tab character as meaning
insert a tab character.

==end of historical conjecture==

Ideally, each and every file (and device) would have a description of where
the (virtual) tab stops are FOR THAT FILE, and tab characters could then
be used to mean what they mean on typewriters.  (But some method would have
to be provided to change the meaning in the middle of a file.  After all,
when typing a document, you can, and often must, change the tab stops.)
However, in my opinion, it isn't likely that there will ever be a standard
on how tabs are to be used, interpreted, and stored.  We will always have to
live with the tabs that were inserted into files in the past, and we will have
to understand their semantics.

My suggestion is drop the subject.  Let each person program their editor of
choice to act the way they want, or, possibly, the way their boss tells them.

-- --
 Dave C.                          cantor@star.enet.dec.com
 Digital Equipment Corp., Nashua, NH  03062, USA
  The views expressed herein are my own, except where attributed to 
  someone else.  They are neither the opinion of, nor the responsibility 
  of, Digital Equipment Corporation.
Newsgroups: comp.editors