Newsgroups: | comp.compilers |
From: | plong@perf.com (Paul Long) |
Keywords: | design |
Organization: | Performance Computing Inc., Beaverton, OR |
References: | 95-04-013 95-05-047 |
Date: | Fri, 12 May 1995 17:35:43 GMT |
ok@cs.rmit.edu.au (Richard A. O'Keefe) writes:
> - to what columns should the TAB format effector move?
> UNIX convention here is absolutely consistent: multiples of 8.
> Anything else violates UNIX conventions, the expectations of a
> lot of tools and a great many people, and good manners.
I've never heard of a "UNIX convention" for tabbing. Many devices and software
tools default to 8 columns, but I assume this harkens back to FORTRAN, Teletype
consoles, or even typewriter tab stops (was 8 columns an inch somewhere?). None
of the UNIX projects I've worked on standardized on 8-column tabbing. The only
project that did was a VMS project.
BTW, there was a study (Miaria, Richard J., et al. 1983. "Program Indentation
and Comprehensibility." _Communications of the ACM_ 26, no. 11 (November):
861-67) that showed that the optimal indention for comprehension is 2 to 4
columns. The worst is no indention (of course) and the next worst is 6
columns. I don't know how 8-column indention ranks.
The study also found that, despite the empirical data, many people felt that
6-column indention was easier to use. I assume they felt that it is more
asthetically pleasing to look at. There is an analogous situation with monitor
brightness. Another study has shown that people prefer their monitors brighter
than what is optimal for visual accuity.
Paul Long
plong@perf.com
[Every Unix screen editor I have ever used, dating back to about 1977, used
8 character tab stops. Some printer drivers I wrote then also had 8 char
stops. The convention that a 0x9 in a text file means logically skip ahead
to the next multiple of 8 spaces needn't have any connection to how you lay
out your code nor what your editor does with the tab key. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.