syntax of commenting (was: Re: [plt-scheme] Student parsing problem)

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Jun 3 15:04:15 EDT 2009

On Jun  3, John Clements wrote:
> 
> I think you're misunderstanding me; what I'm pointing out is that
> for a COMMENT form to work correctly, it would have to be a reader
> form-- like #; , and like #| |#--and not a macro.  It just happens
> to be a reader form that our textual editors can already handle
> conveniently.

This only gets you deeper into the quicksand.  What about:

  (parameterize ([read-case-sensitive #f])
    (read (open-input-string "(comment ...)")))

or any of these:

  [COMMENT ...]
  (\COMMENT ...)
  #(COMMENT ...)
  (COMMENT...)   for example (COMMENTARY ...)

And I didn't even begin to talk about confusions like

  > (list-ref '(COMMENT 3) 0)
  list-ref: expects 2 arguments, given 1: 0

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.