[TUHS] tabs vs spaces - entab, detab

M Douglas McIlroy m.douglas.mcilroy at dartmouth.edu
Sat Mar 6 02:44:49 AEST 2021


> The reason to use tab was file size for one

This is urban legend. The percentage of 512-byte blocks that
tabs would save was never significant.

(I agree that tabs and--especially--newlines can significantly
compress fixed-field formats from  punched-card tradition, but
on the tiny Unix systems where tab conventions were
established, big tabular files were very rare.)

Tabs were a convenience for typists. Of course the tty driver
could have replaced them with spaces, but that would have
foreclosed important usage such as tab-separated fields and
run-time-adjustable tab stops tab-separated fields.

(I have run into latter-day trouble with selecting a space-substituted tab
from a screen, only to discover that I was copying or searching for spaces
instead of the tab.. That's not  an intrinsic problem, though. Editors like sam
handle it without fuss.)

Doug


More information about the TUHS mailing list