2954: Bracket Symbols

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
Bracket Symbols
’"‘”’" means "I edited this text on both my phone and my laptop before sending it"
Title text: ’"‘”’" means "I edited this text on both my phone and my laptop before sending it"


Ambox notice.png This explanation may be incomplete or incorrect: Created by a ([{《"Somewhat satisfied rob- I mean human"》}]) - Please~~ change this comment when editing this page. Do *NOT* delete this tag too soon.
If you can address this issue, please edit the page! Thanks.

Brackets, also called parentheses, are typographical symbols used to delimit a section of text. Unlike most typographical symbols, brackets usually come in pairs, and the end bracket is typically the mirror image of the start bracket.

This comic shows a variety of (mostly) real bracket symbols, along with Randall's description.

Symbols Comic text Real use Explanation of the joke
( ) Regular parentheses for setting stuff aside The regular curved bracket is the most commonly used in literature, and typically denotes aside remarks that are relevant to, but not part of, a sentence (for example, a clarifying explanation). In stage plays, teleplays and screenplays, they can indicate stage directions. It is also frequently used in mathematical expressions and programming languages as a grouping operator, to force a particular order of evaluation. Randall explains, accurately, that these are regular parentheses. No joke yet.
[ ] Square brackets (more secure) In literature, square brackets often denote meta-textual information, such as glosses, omissions for brevity, editorial comments or translation-related notes. In mathematics, they are often used for matrices or closed intervals. Sometimes they are used as outer parentheses for easier visual matching in complicated expressions. In programming languages, square brackets are commonly used as the indexing operator, with the index being placed inside the brackets. They may also be used to denote specific data structures such as arrays or lists. In language definition syntaxes such as Extended Backus–Naur form, square brackets indicate something optional. The straight edges and sharper corners make these brackets resemble a solid box, presumably made of a hard material, which would be a more secure container than the "soft"-looking curved brackets. They also resemble staples, which are used to hold things in place securely. This may also be a pun on "open" and "closed" intervals, with the joke being that a "closed" interval is more secure than an "open" one, since it is harder for things to leave a closed container without your consent.
{ } This stuff is expensive so be careful with it Known as "curly brackets" or "braces". Rarely used in normal text, although may be used in expanded form to 'enclose' multiple optional lines following/preceding a single element of common purpose (similar to the 'split and recombined tracks' of 2243: Star Wars Spoiler Generator). In mathematics, usually used to denote sets, but other usage is possible. In programming languages they are popularly used to denote the start and end of a block of code, to the point that there is an entire group of languages informally known as 'curly-bracket languages'. In language definition syntaxes, curly brackets often denote that an expression can be repeated multiple times. Curly brackets look fancy, like gates with ornate ironwork. Randall implies a world where expensive stuff is set aside using the fanciest brackets available. Writing them by hand is also more complicated than regular or square brackets (in a way making them slightly more time consuming/expensive).
Someone is talking Used to denote speech or citations in normal text. There are various styles from the identical pairing " " to the 66-and-99-like “ ” which differentiates opening and closing quotes. The comic appears to use a handwriting-only slope-variation.

The straight (ASCII) style is commonly used in programming languages to denote text that is data, rather than code, such as literal messages intended to be displayed to the user.

Word processors commonly implement “smart quotes” by detecting the use of the single-type keyboard character at each end of a possible quote and converting it into the fancier left/right versions (though this is not always desired, leading to the default behaviour being disabled or reverted).

Typical form of quotation marks. Quotation marks are most often used in literature to mark dialogue (words said by characters talking) as opposed to descriptions or narrative. Some languages or communities use different typographical conventions such as „German quotation marks“. See also below for British and French conventions.
Someone British is talking Allegedly 'British quotation marks', although this may be disputed by actual Brits who were taught otherwise. Single quotes might be more often used as 'scare quotes' or a related form of 'emphasis' marker. One possible distinction is that single-quotes give non-literal paraphrasing, wherever double-quotes are used for the verbatim reporting of words (spoken or written).

In programming languages single quotes are used for diverse purposes. In C and Pascal families they are used to delimit single characters as opposed to strings of characters, which use double quotes. In many scripting languages like Unix shells, Perl, Python, JavaScript and others single quotes are used for strings as an alternative for double quotes, in some cases with different rules for interpreting the contents of such string. In Visual Basic single quotes (unpaired) are used to mark comments. There are other uses, depending on the language.

As with the double quotes above, the comic versions appear to be handwriting-specific, with no easy-to-use equivalents in commonly used computer fonts.

Alternative form of quotation marks. Some British media use these to mark dialogue, for historic reasons, though in modern usage the double quotes may be more common and acceptable.

Single quotes within double quotes (and/or double quotes within single, as necessary) can also be used to more clearly indicate reported words as part of an outer quote, i.e. when you're quoting one person and their statement contains a quote of someone else. The main quotation would be surrounded with double quotes, while the nested quotation is delimited with single quotes (or vice-versa, depending upon the house style in use). This may even be further alternated to arbitrary depth!

‹ › An Animorph is talking Angle brackets. Aside from telepathic speech in prose, it's often used in comics to indicate that a character is speaking a foreign language that has been translated for the reader's benefit – at least notionally. Angle brackets are heavily used in HTML as markup tags to define how the source of websites intends to convey various stylistic and/or semantic distinctions. Books like the series Animorphs or science fiction novels use these when a character is communicating nonverbally, for example via telepathy. In the Animorphs series, this is called thought-speak, or sometimes "thought speech".
« » A French Animorph is talking French quotation marks. Used for quotes within quotes in some languages. For quoting conventions in different languages, see this document. These symbols are French quotation marks - that's their actual name - and are used in French texts as the first-level quotes. Here Randall is mixing the SF convention described above with actual French use.
| | I'm scared of negative numbers but these sigils will protect me Vertical bars in mathematics are used for the Absolute value function. The absolute value of a number is its value with all negative and positive signs stripped off; in practical terms this is used to ensure a given value is positive (ex. |-69| = 69). If for whatever reason you need to "protect" your equations from negative numbers (which does come up in programming from time to time) the absolute value function has you covered — though it may not always be denoted with vertical bars. Sigils are symbols used in magic, often for protection from evil.
* * _ _ / / I have a favorite monospaced font These symbols are conventionally used in text-based computer communications (such as emails, chats, Usenet News articles) to denote *bold*, _underlined_ or /italic/ font; some client programs interpret them and display actual bold text etc. The kind of person who uses these symbols is the kind of person who uses a terminal emulator, which allows users to select one's favorite (preferably monospace) font. A Monospace font is a font (set of shapes used for letters, numbers and symbols) in which every character has the same width, unlike a variable-width (proportional) font, in which, for example, the letter I is much narrower than W. While a proportional font is more pleasant to read, monospace is easier to represent in simple mechanical or electronic devices, and has been used almost exclusively in the advent of computer technology, specifically in text-only environments such as computer terminals; these most often had only one bare-bones font that did not provide separate glyphs for different styles of character (weight, slant) or the ability to superimpose characters (directly adding underlines).
~~ I'm being sarcastic and I had a Tumblr account in 2014 Used in the markdown specification to denote text with a horizontal line through it, known as "strikethrough". Used by most places that implement the markdown spec, such as Discord, Reddit, most wikis, Github and Tumblr. Strikethrough markup can be found on sites like Tumblr, Reddit or Discord to indicate that you didn't really mean something you said, and such usage peaked in the mid-2010s. This could also reference the trend of putting tildes after words or sentences to indicate the words are being said in a lilting or sing-song manner, or to indicate it is being said in a cute, nice, seductive timbre or as a particular part of a subcultural reference, e.g. in Furry fandom. Applied to a chosen username, it may be made to make it stand out, or else add sufficiently uniqueness despite the core name being likely to be in common use.
[([{()}],)] These Python functions are not getting along The square brackets denote a mutable list, the round brackets an immutable tuple , and the curly brackets a set. It is valid to have them nested like this. [] could also be a slice (a bit of a list or tuple) and {} could be a dictionary, but the syntax is wrong for these. Random parentheses - Spaghetti code (badly maintained or written) in programming languages including Python will often be badly organized creating a mess of indentations and brackets used to create functions or loops etc.
⌊ ⌋ Help, I'm a mathematician trying to work with actual numbers and they're scary Mathematical symbols meaning "floor" (i.e., round down to the nearest lower integer). Mathematicians stereotypically prefer to work with abstract symbols and concepts rather than numbers or indeed anything that might pertain to the real world. When presented with an "actual" (real) number, it is possible that a mathematician may wish for it to be rounded to the nearest integer to make it simpler, or handle it using number theory.
∫   Why are you trying to read my violin? ∫ looks like the Integral symbol which itself is derived from a Long s. In mathematics it is usually paired with the differential of the variable of integration (e.g., dx). A reverse integral symbol is not used in Western mathematics typesetting; it occasionally appears in mathematical texts written in Arabic, along with other symbols likewise adapted to Arabic's right-to-left writing direction. The symbol also looks like a lowercase esh (ʃ), used in phonetic transcription.

There is no unicode symbol for the reversed version - it is displayed here as a reversed ∫. The esh symbol has a reversed counterpart in Unicode, but it's quite a bit shorter (ʅ).

Violins are known for their characteristic F-holes.
This symbol also resembles half a pair of curly braces.
| ⟩ Don't stop here–this is quantum country This notation is used in quantum mechanics to notate a vector. This is called a ket, and the mirrored sign ⟨| is called a bra. Combining them as bra-ket gives the inner product ⟨|⟩. This is paraphrasing the movie Fear and Loathing in Las Vegas, where Johnny Depp's character Raoul Duke says "We can't stop here, this is bat country!" while hallucinating violently on drugs, though not as violently as later in the movie.

The title text includes different kinds of quotes, including the ASCII " and ' as well as the Unicode “ and ” (which have both an opening and closing version). By default, iOS uses the latter curly quotes, while Windows uses the former straight quotes (an OS-level application of the “smart quotes” described above). Editing the same text on both an iPhone and a Windows computer, in circumstances with a different approach to such general auto-replacement, can leave both types of quotes in the text.

Parentheses are a running joke on XKCD. Previous parenthetical comics include:


Ambox notice.png This transcript is incomplete. Please help editing it! Thanks.
Bracket Symbols
and what they mean
( ) Regular parentheses for setting stuff aside
[ ] Square brackets (more secure)
{ } This stuff is expensive so be careful with it
" " Someone is talking
' ' Someone British is talking
‹ › An Animorph is talking
« » A French Animorph is talking
| | I'm scared of negative numbers but these sigils will protect me
* * _ _ / / I have a favorite monospaced font
~ ~ I'm being sarcastic and I had a Tumblr account in 2014
[ ( [ { ( ) } ] , ) ] These Python functions are not getting along
⌊ ⌋ Help, I'm a mathematician trying to work with actual numbers and they're scary
ʃ ʅ Why are you trying to read my violin?
| ⟩ Don't stop here--this is quantum country

comment.png add a comment! ⋅ comment.png add a topic (use sparingly)! ⋅ Icons-mini-action refresh blue.gif refresh comments!


ummm. How does editing this stuff work. Is this HTML? Why can't we have a gooey? Also, I only sort of get this comic, but it's not that funny. <marquee behavior="scroll" direction="up">Here is some scrolling text... going up!</marquee> 05:13, 4 July 2024 (UTC)

Have a WHAT? - 09:26, 4 July 2024 (UTC)
A Gooey. Although I'm not sure how that would help. 11:27, 4 July 2024 (UTC)
I'm sure that should be GUI (Graphical User Interface. -- 11:40, 4 July 2024 (UTC)

The "violin" symbols look like an upside-down bag symbol (multiset symbol) to me, moreso than integrals. 18:09, 4 July 2024 (UTC)

Did my best with my first ever contribution - I know there's a chart feature but I cba to relearn html. Feel free to fix it and PLEASE finish my bad explanations. Qwikster (talk) 06:05, 4 July 2024 (UTC)

⌊⌋ are floor brackets (and you can now copy-paste them from here into the explanation as needed) 06:03, 4 July 2024 (UTC)

As for the spaghetti, in Python, it'd be a list containing a tuple containing a list containing a set containing an empty tuple. Probably doesn't mean anything specific and pretty much useless), but it *is* legal code 06:05, 4 July 2024 (UTC)

Yay, I figured out how to use a table! Qwikster (talk) 06:42, 4 July 2024 (UTC)

I'm British, ex 60+ years and I'm sure I was taught in school to use "for first person speech" and 'for quoting others'. I hadn't even noticed printers doing the opposite. But there again I didn't go to Grammar School. RIIW - Ponder it (talk) 07:36, 4 July 2024 (UTC)

[Update] Researching this issue, using " or ' is acceptable in the UK as long as you are consistent in any work. However, most British authored books I have use '. Then, thought I, Douglas Adams did his own type setting, what did he use? In my box set of HHG2G it's '. But then I found a first (paperback) print run of Dirk Gentley's Holistic Detective Agency... And he used ". I don't think he would have been fickle, so that tells me the ' in British books is a printers' foible. (Controversially, they were responsible for a lot of extra u's being added to 'Latinise' spelling, even in words with Greek or Germanic roots and the replacement of Fall with Autumn) YMMV.RIIW - Ponder it (talk) 10:42, 5 July 2024 (UTC)
I remember thinking it was to 'save ink'. After all in a 300 page novel with a lot of "speech", imagine how much savings you might have with 'speech', instead... ;)
But I'll accept "printer's foible" (or 'prïnter"s foïble'!) as an answer, given that we were still taught to write with doubles (and using fountain pens). Pity they couldn't have also refused to print Oxford Commas, though, which are complete waste of space (and, in their case, ink!)... 12:30, 5 July 2024 (UTC)
I'm British, too, and as I recall my school says sixty years ago, the symbols () are just called brackets and parenthesis is just the grammatical construct in which they can be used. But you can use dashes or even commas to indicate a parenthesis. This has been discussed on such blogs has Ben Yagoda's Not One-off Britishisms. https://notoneoffbritishisms.com/2015/12/15/square-brackets/ -- 08:16, 4 July 2024 (UTC)
Yeah - I don't know where this weird idea that British people use single quotes comes from - it's not my experience. Generally seems to be double quotes for direct speech, and single quotes for paraphrasing, scare quotes, 'jargonisms', etc. I've added to the explanation to reflect that a bit. 11:33, 4 July 2024 (UTC)
Similar vintage of Brit, here. Always taught to write "66s and 99s" on any primary quotation (you'd '6 and 9' quotes-within-quotes and 66/99 quotes-within-quotes-within-quotes). Except books often seemed to be single(-double(-single))-nesting, always assumed that was the US standard, as they tended to have the likes of "color" and "sulfur", too.
In typing (typewriter, word processor and on into the internet age) I'd use ""s as my primary, unless it 'wasn't really speech'... essentially scare-quotes, or emphasis. Though in the text-only information age (usenet, etc), I'd use some of the others for /Italics/, *Bold* and _Underline_ purposes.
For coding purposes, I'd have to use whatever the programming language required (I added the note about Pascal's character/string differentation), except in Perl, where I go for a 'sensible' mix of aesthetics/readability and practicality as I make wide use of the full range of options available to me, in quotation context, whatever doesn't clash badly with any use of q[array], qq{sub or hash}, qx|binary OR|, =~s/whatever is in my/regexp/, etc... 12:54, 4 July 2024 (UTC)

The integral sign (and its reverse) in the context of string instruments are the so-called 'F-holes', and they're not just decorative elements but help in the instrument(s) resonate more freely. Other shapes exist as well. See here for an in-depth explanation. 09:13, 4 July 2024 (UTC)

「かっこ」 09:24, 4 July 2024 (UTC)

Randall missed an opportunity to reference catamorphisms i.e. banana brackets. There may be some better examples missed as well.

Who is that? 10:05, 4 July 2024 (UTC)

Likely reference to the quote and catchphrase "We can't stop here, this is bat country" from Fear and Loathing in Las Vegas? 11:05, 4 July 2024 (UTC)

The 'violin' quotes may look similar (but not identical) to the S-Shaped bag delimiters (U+27C5 & U+27C6), though these are normally used in the opposite order to enclose multisets. 13:52, 4 July 2024 (UTC)

The French quotation marks « » are better known as guillemets. They are also used in Spanish, and probably several other written languages. 15:10, 4 July 2024 (UTC)

The single-/double-quotes being recursively embedded with the other reminds me of a short story I once read. It had the form of a tale a person was telling of when he encountered a stranger with a tale of his own. In that tale, the stranger made the aquaintance of a particularly talkative individual. That individual reported the story he heard from a further interlocutor, that story featuring the reminiscences of someone else... Which came to a conclusion." ...is the way it ended.' ...and so went that story" ...but of course that was just what was heard.' ...if, of course, you could credit it." (It was more layers deep, of course, and with both starting quotes and the paragraph-maintaining standards of opening quotes, which yet still managed to suck you in.) Cannot remember who it was by/what it was called, but obviously the play on the style (a bit more clever than just "I met a man who said, 'I met a man who said, "I met a man who said, 'I met a man who said "..."'"'") made a big impression on me at the time. 19:51, 4 July 2024 (UTC)

"~~ I'm being sarcastic and..." The symbol ≈ means approximately equal to. This is much used in some engineering writing. "Output level should be ≈1 Volt." In casual work this may be approximated as "~", or "~~" which is less liable to be confused for a negative sign. -- PRR (talk) 04:02(+:03), 5 July 2024 (please sign your comments with ~~~~)

It can also be used for such as "~240V", AC power supply, and I use tildes an awful lot in Perl for both regexp operations and bitwise negation (though I also like it as a nicely distinctive choice of delimiter character for joined/split data transportation, at times) . As to the comic text, I sort of associate it with the 'decorated' usernames (akin to Dwarf Fortress 'item quality modifiers', but of course not inspired by such, not sure if they inspired it) along the lines of .~·«wIeRdLyReNdErEdNaMe»·~. 10:21, 5 July 2024 (UTC)

As the only person to get an Academy Technical Achievement Award for inventing screenplay text formatting (and a produced screenwriter in the WGAw), I’m here to let you know square brackets are NOT used in screenplays, teleplays, or stage plays to denote stage direction. Square brackets aren’t used for ANYTHING in those script forms. This should be corrected (by someone more conversant with edits) to indicate that normal parenthesis are used in screenplay or teleplays to indicate stage direction associated with specific passages of dialog. These are typically called “parenthetical action” or “parenthetical.” Some stage play formats omit parenthetical action but place parentheses around passages of stage action. But NEVER square brackets. -- SMGxkcd (talk) 13:11, 5 July 2024 (please sign your comments with ~~~~)

Per this unsigned comment, I've made the requested move from square brackets to parentheses. I don't know if this is correct or not, so maybe additional discussion could confirm or refute this claim. Ianrbibtitlht (talk) 13:34, 5 July 2024 (UTC)

Should we start up an Animorphs category now? It's been referenced a few times now, 1380, 1817, and also in 1187 and 1360. Fephisto (talk) 14:00, 5 July 2024 (UTC)

has existed since 2014, and this comic is (as of now) tagged with it: Category:Animorphs -- 14:16, 5 July 2024 (UTC)
('_')b Fephisto (talk) 14:18, 5 July 2024 (UTC)

Double quotes: "Someone is talking". Single quotes: double quotes, but this someone is talking... with "missing teeth"...? Making fun of British dental hygiene is still common? Or died that out with Brexit? 20:10, 5 July 2024 (UTC)

It's basically untrue, of course. The difference might be that in Britain 'cosmetic' dentistry isn't as prioritised as actually keeping them healthy.
It doesn't go into it there, but the thing about a third of people "not having any natural teeth" in thr 1970s might actually have been a side-effect of prior eras dental care, where the opportunity to have all your teeth taken out to avoid problems in the future. Often arranged as a wedding present to newlyweds. So you had generations of adults (young to old) now using dentures (which either look better than 'natural' teeth or aren't made well enough). With the rise of the NHS (which initially got overwhelmed with people getting their traditional whole-mouth-removals 'free'), things changed so that it wasn't a luxury to get dental care, though it did become far less 'free at the point of need' than most other elements of healthcare (both as reaction against the initial overwhelming of the post-war services and from 'tweaking' (often by the usual political suspects) by one government or another).
Right now, there are minor crises in 'dentist deserts' (the availability of NHS dentists being sparse for some regions, for various reasons), but if you are happily registered with a practice then you're probably as Ok as your own personal approach to dental hygiene allows you to be. And if you can (and want to) pay, then fill your boots with 'Turkey Teeth', whitening, straightening, etc, to make the "actually pretty ok" mouth whatever you think is 'perfection'. (Which often ends up giving you more of a 'plastic fake dentures' look than anything else.)
I mean, not funny, but possibly educational. 22:52, 5 July 2024 (UTC)

Bad encoding. My firefox shows the title text as ’"‘”’ (on the original website, not here). 11:16, 7 July 2024 (UTC)

The explanation for the last item should probably reference the book Fear and Loathing in Las Vegas by Hunter S. Thompson, as that is the source of the quote in the film. 17:48, 20 July 2024 (UTC)