July 13, 2022 — About 85% of the languages in PLDB have line comments.
A language supports line comments if it defines a special token (nowadays usually
#) where everything after that token until the end of the line becomes a comment. Example:
print "Hello world" # this is a comment
These are different from multiline comments which are delimited by a pair of tokens (such as
The SQL languages all generally use
The era of experimentation with line comment tokens appears to be over: the last time a new line comment token appeared in the top 250 was 1993.
Like everything, there are exceptions to the common cases. A few languages, such as SPSS, have a more restrictive form of line comment where the line comment token has to be the first token on the line.
A few languages also support multiple line comment tokens. The Ini config format supports both