[sc34wg3] Multi-line comments in CTM

Xuân Baldauf xuan--2008.01--sc34wg3--isotopicmaps.org at baldauf.org
Tue Jan 22 13:06:33 EST 2008


Lars Heuer wrote:
> Hi,
>
> [...]
>   
>> Regarding single-line-comments:
>>     
>
>   
>>    1. Each single-line-comment can be emulated by exactly one multi-line
>>       comments, but you cannot emulate each multi-line-comments by
>>     
>
> I hope this isn't a request to drop single line comments.
Not at all. :-) (Actually, it is a conditional request just in case
somebody proposes we need only _one_ comment syntax, then I would drop
single-line-comments before I would drop multi-line-comments.)
> Having
> multi-line comments only is a mistake.
>   
I fully agree. I use single-line comments as well and find their
existence useful.
> If I want to comment out a line I don't want to jump to the end of the
> line (or to the following line) to add my "here ends my
> comment"-delimiter.Therefor a single-line comment is more important
> for me (and editors may or may not help you if you want to comment out
> block of code).
>
>   
>>    2. Furthermore, if you view a CTM document as a stream of characters,
>>       the questions are just about which "comment-start-sequence", which
>>       "comment-end-sequence". For single-line-comments, the
>>       "comment-end-sequence" is, by definition, also a
>>       "line-end-sequence".
>>     
> [...]
>
> Not sure if I understood this, but the EOL is not part of the
> comment. Currently a single line comment is defined as "starts with #
> and ends just before the EOL", if that matters.
> (Replace "#" with "!!" if the Kyoto comment syntax is approved :/ ).
>   
The point I wanted to make is independent of whether EOL is actually
part of a single-line-comment or just (by definition) following it. I
just wanted to say that forcing EOL to have two meanings (represent a
line-break and a comment end) even if the author only wants to have only
one of these meanings (just represent a line-break but not represent a
comment end) is poor design. (Allowing EOL to have both these meanings
(single-line-comment) while also allowing EOL to have only its original
meaning (multi-line-comment) is considerably better.)
> Best regards,
> Lars
>   
ciao,
Xuân. :-)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.isotopicmaps.org/pipermail/sc34wg3/attachments/20080123/47fb3eb3/attachment.htm 


More information about the sc34wg3 mailing list