CLAS

Richard A. O'Keefe ok@atlas.otago.ac.nz
Tue, 9 Mar 1999 10:52:21 +1300 (NZDT)


	So do we. Therefore the Clean compiler always assumes that tabs have the =
	same size (4) on all systems.

The Clean system may *ASSUME* this but

	IT ISN'T ****TRUE****.

Tabs on UNIX systems are all-but-immutably *EIGHT* columns apart not 4;
always have been, and probably always would be.

	If the tab size would be 8 on unix and 4 =
	on the mac and pc, you could get compilation errors when source files =
	are moved between those systems.

But the tab size *IS* 8 on UNIX and quite often on PCs,
and as a result we *DO* get compilation errors when source files are
moved between those systems.

There is no way whatsoever that I am going to rewrite a couple of
hundred UNIX utilities for the sake of Clean.  In fact there's no
way I *can*.  I *especially* cannot change the printer programs that
I use.

	The compiler and IDE also support text =
	files with the wrong new line codes for the platform.
	
Yes, that's good.  It's also easy.  SO IS SUPPORTING THE UNIX CONVENTION
FOR TAB STOPS.

	Tabs can also be expanded or unexpanded with expand or unexpand.
	
Yes, I know that, and anyone who can type 'man -k tab' can also know it.
The point is that it's an *EXTRA* *manually* executed step that ought not
to be necessary.

	>For what it's worth, I have suggested to the Clean team before that
	>allowing special header comments like
	>    //charset=3Diso-latin-1 tabs=3D4
	>would help a lot.=20
	
	This would cause problems when a source file with tab size 8 is moved to =
	a mac or pc, because the editor does not recognize the header comment =
	and would show the source file with a different tab size.
	
Then bl---y well FIX the editor so that it *does* recognise the header
comment.  Emacs can do things like that, Vi can do things like that.
What's more, I for one don't greately _care_ what the Clean IDE editor
can or cannot do, because there is so very little of _anything_ it can
do.  When I have serious editing to do on a Mac, I use Alpha, which
certainly _can_ be programmed to read a header comment and set tab stops.

	Why not tell the editor that the tab size is 4.

BECAUSE THE EDITOR IS NOT THE ONLY RUDDY PROGRAM THAT RUDDY WELL
HAS TO KNOW!  Sometimes, you know, I do _print_ Clean source files,
and the print command I use *knows* that tabs are every 8 because
that's what they *are* in UNIX, and I cannot tell it otherwise,
and see no reason whatsoever why I should have to.

There is one very very simple thing you can do in the Clean IDE editor
which would make life a lot more pleasant for people who have to use
several systems.  Have a command on a menu somewhere:
    "replace tabs with spaces".
And have an option for the compiler (on all platforms):
    "report tabs as errors"

To assume that tabs *can* be set to 4 without chaos on UNIX is to assume
something at odds with reality, which is by definition insane.

In the mean time, my advice stands.  If anyone wants to make Clean code
available to other people, *you* get rid of all the tab stops, because
they *will* cause trouble of one kind or another.