Comments is an actively used design pattern.

?Years Old
  • Comments ranks in the top 50% of entities I track
  • the Comments wikipedia page
  • I have 153 facts about Comments. what would you like to know? email me and let me know how I can help.
  • Read more about Comments

Languages without Comments include json

Languages with Comments include acl2, ada, apex, apl, applescript, asymptote, autohotkey, autoit, awk, babel, ballerina, basic, befunge, c, chapel, chuck, clean, clojure, cobol, coffeescript, coldfusion, common-lisp, cpp, d, dart, delphi, dylan, e, ecl, eiffel, elixir, elm, erlang, euphoria, f-sharp, factor, falcon, false, fancy, fish, forth, fortran, freebasic, frink, futhark, gambas, gap, genie, go, gw-basic, haskell, haxe, idl, ini, io, j, java, javascript, jcl, joy, julia, k, konsolscript, kotlin, lasso, latex, lily, lilypond, lingo, livecode, logo, logtalk, lotusscript, lua, m4, maple, matlab, maxima, maxscript, metafont, mirah, modula-2, modula-3, monte, moo, neko, nemerle, nesl, netrexx, newlisp, nim, nsis, oberon-2, ocaml, octave, openscad, oz, pascal, perl, php, picolisp, pike, postscript, powershell, processing, prolog, purebasic, purescript, python, r, racket, rebol, rexx, ring, rlab, ruby, rust, sas, sather, scala, scheme, scilab, seed7, setl, simula, smalltalk, snobol4, sql, squirrel, stata, swift, tcl, turbo-pascal, txr, unlambda, vba, vbscript, verilog, vhdl, xojo, xpl0, xquery, xslt

Example from ballerina:

// A comment

Example from basic:

REM This BASIC program shows the use of the PRINT and GOTO Statements.

Example from c:

/* hello world */
// hi

Example from dart:

// Hi
/* Assume address is not null. */

Example from elixir:

# this is a comment

Example from erlang:

% hello world program

Example from fortran:

C
C Lines that begin with 'C' (in the first or 'comment' column) are comments
C

Example from go:

// This is a comment

Example from haskell:

 -- a single line comment
 {- A multiline comment
    which can continue for many lines
 -}

Example from ini:

# a '#' or ';' character indicates
; a comment

Example from julia:

# This is a comment

Example from matlab:

% This is a comment

Example from ocaml:

(* This is a single-line comment. *)
(* This is a
 * multi-line
 * comment.
 *)

Example from perl:

# This is a comment in perl
=begin comment
This is all part of multiline comment.
You can use as many lines as you like
These comments will be ignored by the 
compiler until the next =cut is encountered.
=cut

Example from python:

# This is a comment

Example from ruby:

# This is a single line comment.

Example from rust:

// https://doc.rust-lang.org/reference/comments.html
// a comment

Example from turbo-pascal:

{ within pairs of braces }
(* left parenthesis/asterisk and asterisk/right parenthesis pairs *)
// preceded by two forward slashes

Last updated July 8th, 2019