dusa icon indicating copy to clipboard operation
dusa copied to clipboard

Nitpicky - Add Alternative Comment Character

Open spencerflem opened this issue 8 months ago • 1 comments

This is nitpicky, so apologies in advance

But would you consider an alternative comment character? Clingo uses % comment and of course // comment, -- comment, and ; comment are all common as well.

I only ask because when reading the code on a text editor without syntax highlighting, I find it easy to mistake #forbid for a comment, and when commenting out sections to test, # #forbid looks awkward to me.

Sorry if this is too frivolous, and thanks again for making such a cool language!

spencerflem avatar Apr 27 '25 02:04 spencerflem

I think any of these would be reasonable, and honestly we mostly suffer from a surfeit of options. Using the same pragma and comment character follows the behavior of Twelf (where the token is %), but I'm certainly not attached to that as the only option (nor am I attached to the absence of multiline comments).

  • I think ; comment could easily conflict with a future use of semicolons in syntax.
  • // comment could maybe conflict with future syntax maybe? But // comment and /* multiline comment */ are so conventional as to make them a frontrunner automatically.
  • -- comment and % comment are also unobjectionable

Don't want to bikeshed this too much, I think C-style line comments are the obvious addition

robsimmons avatar Apr 28 '25 01:04 robsimmons