Ranking Source Code Comment Delimiters
I present a definitive ranking of source code comments. I included some of my favorites and least favorites. I rougly went off of the Rosetta Code list, but didn't put in many of the exotic languages. The ones I did put in were arbitrary, so if your favorite language isn't in these rankings please let me know so I can judge it.
Multiline Comments
#| |#- (two way tie) looks weird but easier to type{- -}- (two way tie) good but a little hard to type/* */- only if it's nestable--[[ ]]--- consistent with--but too many characters%{ }%- easy to change between line and nested, still ugly<!-- -->- Clocking in at a whopping 7 characters, the HTML gets points docked for its ridiculous overindulgence. Not to mention its asymmetry.(* *)- Parentheses and asterisks are already the most overused of characters. You have the whole keyboard to work with! Consider the ambiguity of parsing something like(* try (simpl in *) *)?""" """- is it a string? a comment? who knows???
Single Line Comments
#- "The comment that will probably work"--- elegant look but 2nd place because it has two characters;- feels like you're hacking, good use of homerow//not bad, but just is a little ostentatious, you know?%is typeset so many different ways, looks crunched in monospace!- drawing your attention needlessly"or'- leaves things... shudders unmatchedC- what are we using, punch cards?dnl- discard to next line, more like discard this comment scheme.REM- seriously?⍝- oh, APL.
Honorable mention goes to: BibTeX where everything is a comment unless you say otherwise.