Comparison of programming languages (syntax)

In some cases this is importing the exported functionality of a library, package or module but some mechanisms are simpler text file include operations.

Import can be classified by level (module, package, class, procedure,...) and by syntax (directive name, attributes,...).

Many block syntaxes can consist of any number of items (statements, expressions or other units of code) – including one or zero.

Languages delimit a block in a variety of ways – some via marking text and others by relative formatting such as levels of indentation.

Like raw strings, there can be any number of equals signs between the square brackets, provided both the opening and closing tags have a matching number of equals signs; this allows nesting as long as nested block comments/raw strings use a different number of equals signs than their enclosing comment: --[[comment --[=[ nested comment ]=] ]].

Lua discards the first newline (if present) that directly follows the opening tag.

Technically, Perl does not have a convention for including block comments in source code, but POD is routinely used as a workaround.

[19] The enclosed text becomes a string literal, which Python usually ignores (except when it is the first statement in the body of a module, class or function; see docstring).

In addition, Elixir supports a limited form of block comments as an official language feature, but as in Perl, this construct is entirely intended to write documentation.

Unlike in Perl, it cannot be used as a workaround, being limited to certain parts of the code and throwing errors or even suppressing functions if used elsewhere.

[21] Raku actually allows the use of any "right" and "left" paired brackets after #` (i.e. #`(...), #`[...], #`{...}, #`<...>, and even the more complicated #`{{...}} are all valid block comments).

Many esoteric programming languages follow the convention that any text not executed by the instruction pointer (e.g., Befunge) or otherwise assigned a meaning (e.g., Brainfuck), is considered a "comment".