Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

I need to name a variable containing ()[]{}, what is the common name for all of them?

Two side questions:

  • parentheses is plural, or singular, or both?
  • is abbreviating it as parens understandable?
share|improve this question

7 Answers 7

up vote 9 down vote accepted

There isn't really an established generic for them; if I had to say something, I'd probably say enclosing glyphs. Trying to use "bracket" as a generic doesn't really work because "brackets" usually specifically means () in British English and [] in American English.

Seeing that you're naming a variable, I would probably go with $enclosures.

Parentheses is a plural; the singular is parenthesis.

"Parens" is usual and understandable, yes.

share|improve this answer
10  
In British English, [] are "square brackets" and {} are "curly brackets", so they're all types of brackets, so to speak. –  ShreevatsaR Feb 26 '11 at 15:32
1  
@ShreevatsaR: Oh yes, indeed! I really wonder when/how parentheses came into American usage. It's such a long and cumbersome word! –  Jimi Oke Feb 26 '11 at 16:17
    
@Jimi Oke : I dont know but as the french word is the same ( "parenthèse") i can guess :D –  VirtualBlackFox Feb 26 '11 at 19:06
    
I hear { called curly braces a lot, rather than curly brackets. –  Martin Feb 26 '11 at 20:21
1  
@Jimi Oke, “parenthesis” en.wikipedia.org/wiki/Parenthesis_%28rhetoric%29 originally referred to words contained within the enclosing marks, and then later came to also refer to the marks themselves. –  nohat Feb 27 '11 at 18:56

Wikipedia article on delimiters gives "Bracket delimiters (also block delimiters, region delimiters or balanced delimiters)..."

share|improve this answer

PairedPunctuationMarks is the clearest that I can come up with. However, as a programmer I would strongly urge you to name variables based on how they're used instead of what they are. It makes for easier to read code. So, if these symbols are going to be, say, part of the legal ways to delimit a certain kind of token in your code, a name like LegalUserInputDelimitersForFooRegex might be a better variable.

share|improve this answer
    
I like PairedPunctuationMarks, but it's quite long. Btw., the purpose of my var is to determine if a char is a PairedPunctuationMark and to find its counterpart if so. –  maaartinus Feb 26 '11 at 22:12
    
That's why we have IDEs with auto-complete. If this were my code it'd probably be CharsToCheckForClosingChar or something. Enjoy! –  Neal Tibrewala Feb 26 '11 at 23:11

Instead of "Enclosing glyphs", which sounds like something a technical standards organization would come up with to classify the symbols for something like Unicode, I'd suggest "grouping symbols." "Grouping symbols" may imply a mathematical usage, but I doubt that the association with math is very strong.

share|improve this answer

I agree with Robusto, The Raven, and ShreevatsaR: You can call all of them braces or call all of them brackets. I have heard [] called brackets, square brackets, and square braces; {} called braces, curly braces, and curly brackets. While it's true I have never heard () referred to as "curved braces" or "curved brackets" or anything like that, it is fine to lump them in with other "enclosing punctuation" as those other answers and comments suggest.

I specifically recommend against enclosing glyphs because it is a little too snooty, as if you're some kind of English show-off trying to talk to programmers about programming. I don't mind calling these symbols enclosures, though in programming contexts, this term might be a little too close to closures, which are something else.

Don't forget that <> are also common enclosures, referred to as angle brackets or angle braces.

Finally, so that this answer addresses everything asked, I'll reiterate that () are parentheses; one of them is a parenthesis; and that these can be freely shortened to parens and paren, respectively, especially when talking to programmers.

share|improve this answer
    
Very good answer. One of the thoughts informing my own answer above is that we have the terms "square brackets" and "angle brackets." Although you never see the term "curved brackets," it's very clear from the above that these things are all considered "brackets" of a type. –  The Raven Feb 26 '11 at 20:14

In every IDE I've used, the concept of highlighting or validating matching enclosures has been referred to as brace-matching, so I would suggest brace as a candidate to cover all of the glyphs you mention.

A brace of things refers to a pair of something (the origin is from hunting), and is synonymous with pair.

share|improve this answer
1  
It's also used specifically to refer to {}, unfortunately. –  chaos Feb 26 '11 at 15:43
    
@chaos: The symbol, {, is a brace and it's only referred to as such when it is used to indicate a relationship between two or more items, e.g. a linear system of equations, a system of music staves, etc. Braces would usually mean the pair, {}. –  Jimi Oke Feb 26 '11 at 16:21
2  
@Jimi Oke I was brought up on the term "curly braces" for {}. Funny how oddly annoying it is to hear another term for this symbol! –  David Rivers Feb 26 '11 at 17:49

These can be called "brackets."

Regarding the side questions, "marks of parenthesis" is the standard term, and parentheses is possible, but a bit breezy. "Parens" is the usual abbreviation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.