[racket-dev] comment boxes

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sat Jun 26 14:30:50 EDT 2010

I'll keep comment boxes as is.

Saving comment boxes requires the file to be saved in our fancy file
format and it adds a fair amount of overhead to do that. I'm afraid
that's a non-trivial change (what you're asking for below would be
tricky to get right; easier to optimize our fancy file format), tho,
and it seems to have little payoff.

That said, it is implemented in Racket, so you're welcome to have a go
to try to improve it.


On Sat, Jun 26, 2010 at 9:47 AM,  <engineer at alum.mit.edu> wrote:
> s-expression comments are great.  Thanks for the tip.  They are convenient.
> Also, I see how making it comment-color can reduce confusion.  It's easy to
> miss the #; in the midst of code and not notice it's commented out.
> But I very much like the ability to view commented-out-code as code, with
> coloring and indentation.
> I would like the comment boxes to stay formatted.  I would find it helpful
> for function templates, functions in progress (FIP), and keeping
> old/multiple versions of some things in one file.
> Do comment boxes need to add so much to the file size?  They seem to add a
> lot of metadata.  What if they wrapped the code in something similar to #|
> like #||  ?  DrRacket would not format the internals of #|   |# but would
> format the innards of #||    ||#.
> So formatted and unformatted comments are both important.
> If the coloring were to go away, I might miss it, though it's not been
> critical.  Perhaps it'd make a good option to check on or off (Colorize all
> comments) or allow "render comment as code" as an option for all of or some
> subset of the comment types.  Racket already has more types of commenting
> than I'm used to.  Is it too much to add more?  There could be another
> dimension of commenting, indicating whether to format as a comment or as
> code, like #| vs #||
> Do other IDEs provide options for formatting of comments?  I remember it
> being annoying in the past when, after editing some commented code to keep
> it consistent, I had to uncomment the code, indent it all, then recomment
> it.
> -Paul
>> -----Original Message-----
>> From: robby.findler at gmail.com [mailto:robby.findler at gmail.com] On Behalf
>> Of Robby Findler
>> Sent: Saturday, June 26, 2010 9:29 AM
>> To: Sam Tobin-Hochstadt
>> Cc: engineer at alum.mit.edu; dev
>> Subject: Re: [racket-dev] comment boxes
>> FWIW, I hope to make #; comments actually turn the commented out thing
>> the commented out color.
>> Robby
>> On Sat, Jun 26, 2010 at 8:23 AM, Sam Tobin-Hochstadt <samth at ccs.neu.edu>
>> wrote:
>> > On Sat, Jun 26, 2010 at 9:15 AM,  <engineer at alum.mit.edu> wrote:
>> >> Yes, and it works well.  That's what I see as the major feature of the
>> >> comment box over the comment block.  That and the colorizing.  While
>> >> commented out, it still looks like code.
>> >>
>> >> I was afraid you were going to remove some of that functionality by not
>> >> "Scheme mode"-ing them or something.
>> >
>> > Are there advantages of comment boxes over s-expression comments
>> > (using #;) for you?
>> > --
>> > sam th
>> > samth at ccs.neu.edu
>> >

Posted on the dev mailing list.