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

Re: scope of #!sweet and friends inside parens

Eh, I thought this was part of the definition of "#-based comment", which is basically anything that starts with #\# but doesn't cause the reader to yield a datum.  This includes #| |# and #;.  So #!sweet and friends would be treated the same as #| |# in indentation processing.

On Thu, May 2, 2013 at 6:00 PM, Beni Cherniavsky-Paskin <cben@xxxxxxxxxxxx> wrote:
The spec is not particularly clear on what crazy things like this mean:

(( ... #!sweet ...) ... #!no-sweet ... ( ... #!curly-infix ...)) ...

or this:

define foo()
! a b
! #!no-sweet
! c d

As written, it sounds that the directives must have a flat, global effect on the port, crossing all ( ) boundaries.
But correctly implementing this sounds painful to me.  E.g. you can't call a lower-level (read) / (neoteric-read) unless they understand these directives.  And every procedure must be ready for sweet processing to be turned off underneath it.

I propose for simplicity to say that these directives SHOULD (MUST?) be used only at top level.
Probably also require them to be alone on a line, at column 0 (trailing hspace and comments are ok)?
And say that implementations MAY signal an error if used otherwise.

Beni Cherniavsky-Paskin