[plt-scheme] Student parsing problem

From: Felix Klock's PLT scheme proxy (pltscheme at pnkfx.org)
Date: Wed Jun 3 12:12:34 EDT 2009


On Jun 3, 2009, at 12:04 PM, Eli Barzilay wrote:

> On Jun  3, Felix Klock's PLT scheme proxy wrote:
>> 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.

Okay, if my email client had source code highlighting (as DrScheme  
does), I probably would have discarded the ";#;#;" as well and not  
thought twice about it.

The real problem for me is whether the "#;#;" pattern should be  
considered good practice.  That is the core of what I was objecting to.

Sam has pointed out to me that my preferred form (wrapping the sexp's  
in a begin and using a single "#;") would not work for when he  
comments out multiple cond clauses via repeated "#;".

So I do not have a solution that would work in all cases; but repeated  
"#;" still strikes me as having a bad code smell, especially for  
Student Language code.


Posted on the users mailing list.