Curly bracket programming language: Difference between revisions

Content deleted Content added
Languages: Alphabetized list.
Removed some POV stuff
Line 2:
 
== History ==
Curly-bracket style goes way back before C. [[BCPL]] was the first language to use a curly bracket style, for outlining multi-statement function bodies. [[Ken Thompson]] gave the feature more glory in [[B programming language|B]]. Because [[C programming language|C]] was initially designed after B, C has retained the bracket style of B. [[C syntax]] should really be B syntax. Most languages that came after C ([[C++]], [[Java programming language|Java]], [[ECMAScript]] and its popular descendant [[JavaScript]], [[C Sharp programming language|C#]], [[D programming language|D]], etc.) keep the style. [[Pico programming language|Pico]] is a non-C descendant that also uses this style.
 
Along with curly bracket style is the popular style of terminating a statement with a semicolon (;), which allows for languages that ignore whitespace. BCPL and Pico, unfortunately, do not have this rule. Thus a newline is used as a statement terminator in such languages. The [[Pico indent style]] is then used, as below (BCPL):
 
LET FUNC foo(a) = VALOF