# r
On Sat, 24 Jan 2004 18:29:46 +0100, Wolfgang Thaller <[EMAIL PROTECTED]> wrote:
Graham Klyne wrote:
I think that compilers should issue a warning when indentation that determines the scope of a construct is found to contain tab characters.
I'd say, when it "is found to contain a mixture of tab and space characters".
I have successfully written a lot of Haskell code that uses tabs *exclusively* - in that case, the meaning of the program *doesn't* depend on how the tab characters are interpreted.
IMHO, there should only be warnings about tabs when their size makes a difference to the meaning of the program, as shown in the examples below:
let <spaces>x = 1 <TAB--->y = 1 -- warning
let <TAB--->x = 1 -- OK <TAB--->y = 2 -- OK <spaces>z = 3 -- warning
a = let x = 1 y = 2 -- OK in ...
b = let x = 1 <TAB--->y = 2 -- warning in ...
There are many editors that automatically mix tabs and spaces in indentation (and I don't like that - what's it good for?), but some people will certainly want to continue to use them, so I'm not sure if adding warnings like these would be acceptable to them.
Cheers,
Wolfgang
_______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
_______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell