Personally, I think that comments should have trailing # as well as leading ones, so they are more like strings in that the same character is used to mark both ends.

So in combination with bracketing pairs, we could for example have this:

  #{ This is a comment. }#

That also serves to make the comments more whitespace independent, like with strings in general.

I think the trailing # may also resolve some other issues raised in this thread.

Note that my proposal is orthogonal to other issues like double-leading # or whatever bracketing chars are used.

Also note that if the # are treated more like delimiters, then potentially we could also have \# to escape literal #, same as we have \' or \" etc.

Having # at both ends makes it easier to see at a glance where comments begin and end, and potentially it makes it easier to make a parser or syntax colorer.

-- Darren Duncan

Reply via email to