Main Page | See live article | Alphabetical index

Curly brace family

The curly brace family of programming languages includes C, C++, Java, AWK, Perl, C# and others. The name derives from the common syntax of the languages, where blocks of statements are enclosed in curly braces. For example (using Kernel/K&R indent style, one of many stylistic ways to place curly braces within a program)

for (int i = 0; i < 10; i++) {
  printf("%d", i);
  doTask(i);
}

Languages in this family tend to have syntax that is strongly influenced by C, and often inherit other syntactic features of C such as using the semicolon as a statement terminator (not as a separator) and using the three-part "for" statement syntax as shown above.

There are many other ways to identify statement blocks, such as ending keywords that may match beginning keywords (see Pascal, Ada, and REXX), indentation (see Python), or other symbols such as parentheses (see LISP).