[Grace-core] Comment proposal

James Noble kjx at ecs.vuw.ac.nz
Tue Feb 3 14:26:08 PST 2015


> My comment query got some response, including Andrew off-list
> indicating that his intention in writing that passage was that it
> would restrict the allowable placement of comments.

right - so for me that's the first *design* question:
 - do we want to "restrict the allowable placement of comments"
 - what restrictions do we want?

(OK, the first two questions :-)

> 1) A comment must occupy a complete physical line at statement level,
> up to indentation.

So this forbids comments when there is code on the same line as the comment, right?
Comments like these:

var lastPoint // point where mouse was last seen

0xdeadbeef // Radix zero treated as 16

1 + 2 + 3    // evaluates to 6 

almost all of the comments in the body of the spec as it is are comments with code on the same line

most of the comments in Kim's book are, however, on their own physical line,
proceeded by a blank line and followed by the code they are commenting,
although there are also quite a few comments on the same line as code.

what do we want to do? 

James


More information about the Grace-core mailing list