Newsgroups: | comp.compilers |
From: | ok@cs.rmit.edu.au (Richard A. O'Keefe) |
Keywords: | design |
Organization: | Comp Sci, RMIT, Melbourne, Australia |
References: | 95-04-013 95-04-186 |
Date: | Thu, 4 May 1995 10:40:22 GMT |
scooter@mccabe.mccabe.com (Scott Stanchfield) writes:
>On the mainframe, tabs were a non-issue. On UNIX, I think they could cause
>tons of grief.
Only if people muddle up and confuse three quite distinct things:
- 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.
- how big should the indent increment be in language XYZ?
This has nothing to do with interpretation of the TAB character.
For example, my editor has TAB=8 built in, but there is a command
to set indentation to whatever you want (typically 3 or 4).
- what key sequence should I press in my editor to move to the
next indentation level?
This could be the TAB key on the keyboard without having any
connection whatsoever with TAB characters in the file. (This
is so in Emacs, for example, where the TAB *key* is an indentation
command having only the loosest of connections with the TAB
*CHARACTER*.
The right answer is to use whatever _command_ you want for indentation
and whatever _indentation level_ you want, but leave the interpretation
of _tab characters_ strictly alone.
--
Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.