Recently, I tried to find the reasons that led to the use of curly braces for blocks (compound statements) in C and other languages ββof the same family .
Thinks that the square brackets for arrays or parentheses to change the priority of the operator seem to come from the mathematical notation used for these things, so that makes sense to me. The semicolon also makes sense, it is designed to separate related sentences from independent sentences , and it does something similar in C.
But I could not find something similar for curly braces: they are used for sets in mathematics, and something similar is their use in musical notation (ensemble notes), where they are used to indicate that music on all sticks should reproduced simultaneously (not exactly the same, but I thought it was closer than using them in mathematics for sets).
Also, I was wondering if C is actually the first language that represents this block syntax or just popularized it?
source
share