[plt-scheme] Student parsing problem

From: Anthony Cowley (acowley at seas.upenn.edu)
Date: Wed Jun 3 14:11:08 EDT 2009

On Wed, Jun 3, 2009 at 1:52 PM, Eli Barzilay<eli at barzilay.org> wrote:
> 1. We want a convenient way to comment the next sexpr, even when not
>   in an expression position.
>
> 2. Solution: `#;' does that.
>
> 3. Just like it's convenient to comment out the next *single* sexpr,
>   it can be convenient to comment out the next two sexprs.

My opinion is that #; as a way to comment out an expression is
justifiable because it's easier to toggle than #| |# *and* it is
syntactically adjacent to the expression it affects (this is a
not-so-subtle callback to the origins of this thread).

I agree that it is convenient to comment out multiple sexprs, but I
think that, at this point, one falls back to the #| |# syntax because
the alternatives, from which you make a strong case for the one you've
chosen, require a more complicated mental parse. It's not a binary
toggle ("I'm in a commented out region now") and the syntax in front
of me might not indicate that it is commented out. It's adding an
unusual stack component to the parsing that requires more than one bit
of state to understand.

Your derivation of the form is appreciated and does make sense, so it
is certainly understandable, it just doesn't feel like Scheme (trees
and lists) to me, but that's subjective.

Anthony


Posted on the users mailing list.