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

Re: making indentation marker &| implicit

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

On Tue, May 28, 2013 at 4:19 PM, Per Bothner <per@xxxxxxxxxxx> wrote:


doesn't really make sense.

Actually, we could just make that an error.
    Tabs would have to be consistent: If a line starts with
    T1 tabs followed by S1 spaces, and another line starts with
    T2 tabs followed by S2 spaces, then it is an error if
    (and (not (= T1 T2)) (> S1 0) (> S2 0)).

I presume you mean not an error, just not the same indentation?

I mean an error - it indicates ambiguous use of TABs.

The following would break that rule, yet is not ambiguous:

_TAB_if (...) {
_TAB__TAB_    baz);
_TAB_       blatz);

Were you assuming the lines were consecutive?
I think I could still find counter-examples.

... alternately just define a tab as 8 spaces.

That is fine in a Unix-based culture.  Some programming
cultures use TAB to mean "indentation unit", which can
be set according to user preference.

This was not meant seriously, but rather to throw out another
option showing how hairy this all gets.

However, if we can get consensus on the corner cases, making
some of them errors if need be, I'd be willing to support it.