[plt-scheme] Student parsing problem

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

On Jun  3, Felix Klock's PLT scheme proxy wrote:
> Eli (cc'ing plt-scheme)-
> 
> On Jun 3, 2009, at 11:40 AM, Eli Barzilay wrote:
> 
> > ...
> > and it works with multiple expressions too:
> >
> >  (define (foo x)
> >    ;#;#;
> >    (printf "foo\n")
> >    (printf "  x = ~s\n" x)
> >    ...)
> 
> I find the amount of time my brain needs to lex and parse this to be
> an argument *for* the rule I suggested (which disallows the #;#;
> pattern).

Strange.  All you need is to look at the single `;' that starts the
line and ignore it.


> Do you really think the #;#; pattern is that useful, compared to the  
> alternative below (which is compatible with the rule I suggested):
> 
> (define (foo x)
>    ;#;
>    (begin
>      (printf "foo\n")
>      (printf "  x = ~s\n" x))
>    ...)

Yes I do.  But that's irrelevant to the utility of composing `;' and
`#;'.

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


Posted on the users mailing list.