HAYCORN — 20 April 2015

Tabs and Makefile

The com­put­ing world is lit­tered with un­for­tu­nate mis­takes that managed to make the leap from small-scale in­con­ve­nience to a source of grief to mil­lions or billions–at which point so many people and systems have been become ac­cus­tomed to the error that fixing it is impossible.

One no­to­ri­ous example is the spelling of HTTP header referer, which escaped the Netscape Cor­po­ra­tion em­bed­ded in the bowels of their web browser without anyone notic­ing the error. From there it spread to every other web browser (they needed to be compatible), and finally RFC1945, the Hy­per­text Trans­fer Pro­to­col stan­dard itself. (At least, I’m pretty sure how things happened, but Wikipedia is inconclusive. Does anyone know?)

Another is the fateful de­ci­sion of the author of make to have the space char­ac­ter and the (visually identical) tab char­ac­ter do very dif­fer­ent things. Very early on, the story goes, the author re­al­ized that this was a mistake, but by that point dozens of people were relying on it—backward-compatibility needed to be preserved—and so the tabs had to stay.

Un­for­tu­nately I couldn’t find a good source for this story online, so I emailed the author, Stuart Feldman, and asked him if it was true.

From: Michael Still­well <...@google.com>
Date: Mon, 20 Apr 2015 at 15:33
Subject: make versus tabs
To: Stuart Feldman <...@google.com>

Once upon a time I heard a story that soon after make was
released, one of its first users com­plained that the re­quire­ment
that each command line begin with a tab was suboptimal, and that
some al­ter­na­tive ap­proach should be used. As the story goes, the
author was re­cep­tive to this criticism, but ex­plained that sadly
it was now too late to change the way things worked, because too
many people were used to current behavior. The punchline, of
course, was that at this point make had perhaps dozens of users.

I was Googling a bit to try and figure out whether my memory was
correct (it's sur­pris­ingly re­sis­tant to search), when I
dis­cov­ered that make's author works at Google, and so it might be
pos­si­ble to get a de­fin­i­tive answer by email­ing you directly.

So, to satisfy my curiosity, perhaps you could tell me: is the
story true? Are there any other details you can recall and share?
And how do you feel about tabs versus spaces versus white­space
now?
From: Stuart Feldman <...@google.com>
Date: Mon, 20 Apr 2015 at 15:51
Subject: Re: make versus tabs
To: Michael Still­well <...@google.com>

Story is only partly true.

I used tabs because I was trying to use Lex (still in first
version) and had trouble with some other patterns.

(Make was written over a weekend, rewrit­ten the next weekend ...)

So I gave up on being smart and just used a fixed pattern (^\t)
to in­di­cate rules.

Within a few weeks of writing Make, I already had a dozen friends
who were using it.

So even though I knew that "tab in column 1" was a bad idea, I
didn't want to disrupt my user base.

So instead I wrought havoc on tens of millions.

I have used that example in soft­ware en­gi­neer­ing lectures.

Side note: I was awarded the ACM Soft­ware Systems Award for Make
a decade ago. In my one minute talk on stage, I began "I would
like to apologize". The au­di­ence then split in two - half started
laughing, the other half looked at the laughers.

A perfect bi­par­tite graph of pro­gram­mers and non-programmers.