[Grace-core] Comment proposal
Andrew P Black
andrew.p.black at gmail.com
Wed Feb 4 10:56:47 PST 2015
On Wed, Feb 4, 2015 at 12:56 PM, Kim Bruce <kim at cs.pomona.edu> wrote:
>> I'm a little less excited about allowing them in the middle of complete statements, but there are some spots where I don't think it is awful:
>>
>> // throw away punctuation and change to lower case:
>> thinList := myList.filter(no_punc) // get rid of punctuation
>> .toLower // & change to lower
The canonical example that I know of for end-of-line comments is something like
def spaces = sequence.with(
, "\u0020" // SPACE
, "\u00A0" // NO-BREAK SPACE
, "\u1680" // OGHAM SPACE MARK
, "\u180E" // MONGOLIAN VOWEL SEPARATOR
, "\u2000" // EN QUAD
, "\u2001" // EM QUAD
, "\u2002" // EN SPACE
, "\u2003" // EM SPACE
, "\u2004" // THREE-PER-EM SPACE
, "\u2005" // FOUR-PER-EM SPACE
, "\u2006" // SIX-PER-EM SPACE
, "\u2007" // FIGURE SPACE
, "\u2008" // PUNCTUATION SPACE
, "\u2009" // THIN SPACE
, "\u200A" // HAIR SPACE
, "\u200B" // ZERO WIDTH SPACE
, "\u202F" // NARROW NO-BREAK SPACE
, "\u205F" // MEDIUM MATHEMATICAL SPACE
, "\u3000" // IDEOGRAPHIC SPACE
, "\uFEFF" // ZERO WIDTH NO-BREAK SPACE
)
I see no reason to outlaw such comments. The existing rule about comment attachment works just fine for this sort of thing, which is common in every language that I know of.
More generally, I don't understand the motivation for Michael's proposal. I'm all in favor of revisiting design decisions that have, in the light of a couple of year's experience, where a feature has proved problematic. We are doing this with inheritance–delegation–code-sharing. I'm not aware of problems that our existing comment rules have caused. If there are some, we should perhaps discuss these first, before proposing new restrictions.
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20150204/d776356a/attachment.html>
More information about the Grace-core
mailing list