- Angled brackets: < >
Unicode
Miscellaneous Technical block contains 〈 (U+2329 left-pointing angle bracket) and 〉 (U+232A right-pointing angle bracket). It's the section that also contains stackable (vertically, in different rows) forms:
⎛ ⎞ ⎡ ⎤ ⎧ ⎫ ⌠ ⎲ ⎰ ⎱ ⎜ ⎟ ⎢ ⎥ ⎨ ⎬ ⎮ ⎳ ⎱ ⎰ ⎝ ⎠ ⎣ ⎦ ⎩ ⎭ ⌡ as well as some useful button characters:
⏯ ⏸ ⏹ ⏺ ⏭ ⏮ ⏩ ⏪ ⏫ ⏬Unicode
Dingbats block does contain angle bracket ornaments in various thicknesses, too: ❬ ❭ ❮ ❯ ❰ ❱.
Unicode
Miscellaneous Mathematical Symbols-A block contains ⟨ ⟩ ⟪ ⟫, and ⟦⟧ as Mathematical white square brackets, and ⟮ ⟯ as flattened parentheses.
Unicode
Miscellaneous Mathematical Symbols-B block contains ⧼ ⧽ as curved angle brackets.
Unicode
CJK Symbols and Punctuation has its own 〈 〉《 》.
The
Basic Latin block (ASCII-compatible subset) has < (less-than) and > (greater-than), calls ( and ) parentheses, [ and ] square brackets, and { and } curly brackets.
(Note that wide ncurses (link against ncursesw) can use the above effectively even on terminals, pseudoterminals, and consoles, on Linux, Mac OS, BSDs; I'm only unsure about Windows and WSL, since traditionally Windows has required MS extensions to be used to read or write UTF-8 on the terminal console. I do know PuTTY can handle those including
colors and other ANSI escape codes in Windows when connecting to Linux/BSD/MacOS, if correct connection settings are used.)
I don't care much what people call each symbol or glyph (I'm fully aware of the differences), as long as they're consistent, and when asked, can refer to Unicode code points that correspond to what they mean, so I can use them in practice.
I've found
Box Drawing and
Block Elements Unicode blocks (
list) extremely useful in code comments describing a table, graph, or simple curve, describing the behaviour of a function and why a specific approach was chosen in an
intuitive manner, guiding any maintainer or code examiner a practical idea of what the code should accomplish. These only really work with fixed-width (monospace) characters, and I wish there was a comment style, say
//|, that told common editors to use a fixed-width font for the contents of that comment. That would allow mixing normal text and such graphics in comments. (I personally tend to use fixed-width fonts for source code myself.)
For math stuff, formulae and such,
Arrows,
Mathematical Operators, and
Superscripts and Subscripts (and other related blocks) make it much easier to describe what a function or operation does in a mathematical manner. For example, I believe "
∑ A[i]·Cⁱ, 0 ≤ i ≤ n-1" is a
better comment than say
"A[0] + A[1]*C + A[1]*C**2 + ... + A[n-1]*C**(n-1)", because the former has less cognitive load than the latter. Limiting oneself to Basic Latin, something like
"sum(A[i]*C^i, i=0..n-1)" is a compromise, with less cognitive load to only those who are familiar with text-based Computer Algebra Systems that use a similar syntax.
Other Unicode blocks contain useful glyphs for drawing timing diagrams, etc. for electronics.
Because of this, while I only use
Basic Latin Unicode block (i.e., printable ASCII plus newline plus Tab if already used in the sources) for the code itself (in C, C++, Python, Bash, etc.), I do like to use Unicode within comments, for the added expressibility. This naturally means that I tend to use
UTF-8 (without
byte order mark, since it confuses pure-ASCII editors and utilities) for all my source code files.
(Using UTF-8 for source code, and non-ASCII characters only within comments, also means that you can write the correct form of peoples' names when needed. I like being able to write "Bézier curve" and "Erdős–Szekeres conjecture, or happy ending problem" in a comment.)
Some like that, some dislike it, preferring to limit to Basic Latin ≃ ASCII, especially with C. What grinds my gears is that browser developers have decided that UTF-8 is the only non-legacy character set, with the browser
default character set having to be a legacy character set; i.e. that you should not be able to select UTF-8 as your default character set. This means that if you open a file the browser considers a plain text file, and it contains aforementioned UTF-8 source code, the glyphs won't show up correctly by default; you have to fix or change the character encoding by hand for every new file displayed!
This annoys me to no end, because for the last two decades or so, all browser-displayable files (including plain text files like source code is) without an explicit browser-decipherable character encoding declared, have been in UTF-8.