Ducktype Comment Proposal

Shaun McCance <shaunm at gnome.org>
Thu May 26 09:18:03 EDT 2016

On Mon, 2016-05-23 at 20:44 -0400, Shaun McCance wrote:
> Question: should nested comments be parsed?
> 
>   [#
>   Obviously in a comment.
>   [#
>   Wait, what?
>   #]
>   Is this a comment or not?
>   #]

On further thought, I think I'd prefer not to allow nested comments.
It's more work to do, and most languages don't allow it. But I want to
add one exception to the rule that #] always closes a block comment: If
that #] is actually a [#] at the start of a line (possibly preceded by
whitespace), it doesn't count. That way line comments don't mess with
block comments.

[#
I've commented all this out.

[#] I had this comment here already to give a note to myself,
[#] and it shouldn't mess with the block comment.

This is still commented out.
#]

--
Shaun