[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: spaces and tabs confused?

This page is part of the web mail archives of SRFI 110 from before July 7th, 2015. The new archives for SRFI 110 contain all messages, not just those from before July 7th, 2015.

Yes, it would be an error, and yes, difficult to understand.  Possibly an implementation would give a better error message than "syntax error", preferably something along the lines of "inconsistent indent.  Indent at line X was <tab><space><space>, next line is <space><space><tab>" (i.e. display the error using "<tab>" instead of "\t"), and possibly (if on a terminal) highlight the first nonmatching character especially on deep indentations.

On Fri, May 3, 2013 at 9:02 AM, David Vanderson <david.vanderson@xxxxxxxxx> wrote:
For example, if your editor had a tab-width of 2:

[tab][space][space]define foo()
[space][space][tab]  "bar"

My reading of the spec says this would be an error, but it would be especially difficult to understand, because there's no visual difference.  Am I missing something, or has this already been discussed elsewhere?