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

Re: Why forbid ! in whitespace-only line?

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.

On 05/02/2013 06:24 PM, David A. Wheeler wrote:
Beni Cherniavsky-Paskin <cben@xxxxxxxxxxxx> wrote:
define long-func(x)
   let ((foo bar(x)))
   ! do stuff
   ! ...
   ! more stuff
   ! ...

In any case, I didn't find this discussed in the rationale.
But you're right, we could interpret lines with only "!", space, and tab as "ignored lines" instead (or ignored only if their indents match).  From a code point of view, it'd be trivial if lines with at least one "!", and ONLY "!", space, and tab, were treated as "ignore this line"... then we could reuse how it handles line-comment-only lines.

Thoughts?  I think that would be an easy change.

--- David A. Wheeler
I'm for it, but I'm not sure whether indentation matching should be enforced:

define long-func(x)
  let outer ((foo bar(x)))
  ! let inner ((y z))
  ! ! do stuff
  ! ! ...
  ! ! more stuff
  ! ! ...

In this case, is "more stuff" a child of "inner" or "outer"? Even in the first example, having a space after the ! on the blank line would throw off the indentation, right?

I think I've convinced myself that indentation should NOT be enforced. Anybody else?