[TUHS] tabs vs spaces - entab, detab

Clem Cole clemc at ccc.com
Sun Mar 7 08:05:37 AEST 2021

On Sat, Mar 6, 2021 at 4:38 PM Larry McVoy <lm at mcvoy.com> wrote:

> On Sun, Mar 07, 2021 at 08:31:57AM +1100, Dave Horsfall wrote:
> > (Straying into COFF territory here)
> >
> > On Fri, 5 Mar 2021, John Gilmore wrote:
> >
> > >The one that got me was make(1).  Being used to text editors that used
> > >"tab" as a command rather than a literal character, I proposed a fix
> early
> > >on at Sun that would allow leading spaces as well as tabs in Makefiles.
> > >(I think this was in the Unisoft Unix days, pre-BSD.)  Bill Shannon
> > >actually put it into their source tree.  But in a few days or weeks, he
> > >took it back out, because he realized that Makefiles built on Suns using
> > >leading spaces wouldn't work anywhere else.
> >
> > I loathe make's distinguishment between tabs and spaces; they look the
> same
> > on the screen, and last I looked computers are supposed to serve humans
> and
> > not the other way around.
> Has anyone asked Stu Feldman why make wanted a tab?  Or does anyone know?
> I have to believe there was a better reason than it was one tab vs
> 8 spaces.
According to Eric Raymond in Chapter 15. Tools: make: Automating Your
Recipes", *The Art of Unix Programming*

*Why the tab in column 1? Yacc <https://en.wikipedia.org/wiki/Yacc> was
new, Lex <https://en.wikipedia.org/wiki/Lex_(software)> was brand new. I
hadn't tried either, so I figured this would be a good excuse to learn.
After getting myself snarled up with my first stab at Lex, I just did
something simple with the pattern newline-tab. It worked, it stayed. And
then a few weeks later I had a user population of about a dozen, most of
them friends, and I didn't want to screw up my embedded base. The rest,
sadly, is history.*
*— Stuart Feldman*

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20210306/6789c57e/attachment.htm>

More information about the TUHS mailing list