One argument against semicolon as comment character which has not been emphasized is that it looks a lot like a colon. Imagine someone wanting to comment on what the contents of a variable later down on a page, for instance, and that looking like an assignment:
foo: {bar}
...
print foo; {bar}
Just another problem. I still regularly tinker with the source to see how I feel, and if //
is the answer.
So today I had a thought that hadn't come up, about double-bar. It has some of the nice "unbroken" properties of //
. It might seem like a greater-emphasis version of the "barrier" notion of BAR!.
something: function [ ][ || start
foo: #bar || important
collect [ || collect
keep #foo || foo part not #baz
keep foo || bar part
keep #{DECAFBAD} || requisite binary
] || end collect
||no space required
] ||end
Comparing again with double-semi:
something: function [ ][ ;; start
foo: #bar ;; important
collect [ ;; collect
keep #foo ;; foo part not #baz
keep foo ;; bar part
keep #{DECAFBAD} ;; requisite binary
] ;; end collect
;;no space required
] ;;end
And then again with double slash:
something: function [ ][ // start
foo: #bar // important
collect [ // collect
keep #foo // foo part not #baz
keep foo // bar part
keep #{DECAFBAD} // requisite binary
] // end collect
//no space required
] //end
I think double-slash still has the edge, here. And of all the options examined, it's one from other languages that people will just accept. I still haven't done it yet, but I still think it's likely to be the best idea that's going to come along, and so it's probably what's going to happen.
I've also come to be thinking about the merits of using things like === (or, ==, once retaken) as "live" comments, even using variadic syntax and normal Rebol words:
== STARTUP ==
config: load %/home/duck-detector/config
== MAIN LOOP ==
until [...]
We've even discussed if newline flags are something that can be exploited, you might be able to omit any tail signals and just say == MAIN LOOP, like in MarkDown:
### THIS IS LEGAL MARKDOWN HEADER SYNTAX ###
### SO IS THIS
The downside of this is that your comments have runtime cost, and you're limited to Rebol syntax (which isn't that limiting, especially for writing in headlinese). The upside of this is, they have a runtime presence, you might have a debug level at which they print as they go by...or get written to a log. Or you could even ask the debugger to break there, by name.