datum comments of sweet-expressions - now implemented in Scheme David A. Wheeler 25 Jul 2013 23:02 UTC

I've now modified the sweet-expression implementation, per Mark H Weaver's earlier
posting, so that "#;" at the beginning of a line, followed by whitespace, comments
out a *sweet-expression* instead of just a *neoteric-expression*
(in the same way that this works for ' and so on).

The implementation is now available in the "datum-comment" branch in the
readable-discuss git repository.  It includes the updated grammar, a
tweaked SRFI-110, as well as the sample Scheme implementation that does it.
I'm sure that the SRFI will need to be improved further to clarify it, if we add this.

The implementation turns out to be fairly straightforward.  Adding this does
add a capability to sweet-expressions, and makes it more consistent.
The only negative is that to implement the sweet-expression reader you
have to coordinate with the underlying datum reader.  Basically, there needs to be a way for the
underlying reader to report that it read #; followed by whitespace, without actually
reading the following datum.  My hope is that the sweet-expression reader gets
built into the Scheme implementation; in such cases there's no problem.

I can imagine recommending a special neoteric-read version that returns a special marker,
as well as a special marker; anyone think that'd be a good idea?

So... should we merge this in?  Or not?  It all comes down to, would this increase
or decrease the likelihood of its acceptance?  I'm planning on adding it to the main line,
but I'd like to know if there are problems doing so.

Thanks.

--- David A. Wheeler