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

Re: Draft SRFI update - initial indent with "!"

David Vanderson:
> Sorry, but what was the previous rationale to not allowing initial "!" indents?

Primarily for error detection; it wasn't legal before.

One of purposes of "initial indent" mode is to increase backwards-compatibility.
Sweet-expressions are, in general, really backwards-compatible; but
if you put end one s-expression on a line, and then start another on the same line,
then it doesn't work.  E.G.:
 (define x 1) (define y 2)
becomes, when read as an s-expression:
 ((define x 1) (define y 2))

In practice, that sort of formatting seems to be really rare.
But if someone does that sort of weird formatting, there's a fair chance
that they inserted spaces in front (or can be convinced to add them),
maximizing backwards compatibility.
Since "!" wouldn't happen with traditional s-expressions,
it seemed reasonable to make it an error.

But it's nice to be able to talk about/illustrate initial indents
in ways that make it obvious, or don't get removed by
transports that gobble initial whitespace.  Hmmm... we have a
solution to that already!!!  Let's use it.

--- David A. Wheeler