I propose the following syntax for comments:
BTW <comment>
The comment wouldn't care what's there, and it would run until the end of the line.
I used this in my example on operators
— Kyle, 2007/05/29 04:50
I think I've seen a suggestion on another page of “^^” as a comment string. I think I vote for BTW, though having both would be OK too. — ILikePi, 2007/05/29 12:07
I like the use of BTW in the case statement. May I suggest “SHH” or “PSST” for comments?
— Andrew White, 2007/05/29 14:36
Might I suggest using BTW <Information> to write to the process' standard debug/error output stream instead? It would be used to log debug information about the program as it runs normally. SSH or PSST might also do, although I think BTW best. And also, when it comes to the ^^ comments, the main advantage is that it is easy to see they are not part of the program code. Imagine the following commented out lines:
BTW I HAS A VAR
Versus:
^^ I HAS A VAR
Alternatively
>< I HAS A VAR
Although I think thats a little confusing.
- skiy
Agree, using punctuation chars for marking comments would make them far easier to see. At least until editors support lolcode syntax highlighting xD
— Nicolas, 2007/05/29 18:33
Heh, syntax highlighting isn't out of the question. :P I've got Notepad++ and Kate that I can create highlighting schemes for.
— GandalfDaGraay, 2007/05/30 18:31
What about comment blocks? Perhaps borrowing a page from forums:
QUOTE:
blah blah blah
moar commentz
omg this is borken!
TL;DR
— Geordan Rosario, 2007/05/30 21:28
I've proposed TL;DR as a way for thread death for resource starvation… Threads just naturally came to mind when I was thinking of forum-lingo like TL;DR :)
— wohali, 2007/05/30 21:36
Regarding making comments stand out: comments are pretty much the only thing in lolcode that's in lowercase, so whatever keyword is used (I personally think BTW works great) you can't miss them.
— garoo, 2007/05/31
I think a comment block with BTW at the beginning of each line is pretty ugly, not to mention a pain to work with if you want to test code and comment out a whole section, say.
I like BTW for single line comments (like / / in C), and how about OBTW … TL;DR for a comment block (like /* … */ in C).
- – xrestassuredx, 2007/05/31
BTW could work well for the FINALLY block on TRY CATCH FINALLY if it doesn't already have one. Surely better for comments is I Agree With This Comment
IAWTC <text>
— zed, 2007/03/06