5 ms·
The Great Curly Brace Trace Chase (2003)
- wrs 5y agoI’m happy to see an explanation of why the backslash character exists at all: it’s so you can write logical and/or symbols as /\ and \/.
- colanderman 5y agoCurious whether any modern programming languages use these sequences for that meaning, beside ALGOL which they were intended for. Only one I know of is TLA+ (which also uses standalone \ for set complement).
- vincent-manis 5y agoI do know that some ALGOL 68 implementations used \/ and /\. Not sure if there are any modern systems that do. Of course nowadays we can use the Unicode ∨ and ∧ symbols if we want to (though in the font I'm typing this in, the former can too easily be confused with v).
- ceceron 5y agoMiniZinc language for Constraint Programming uses /\ and \/ as AND/OR operators.
- Someone 5y agoIs BCPL modern? :-) I looked at https://networking.ringofsaturn.com/Web/syntax-across-languages.php#BlnsLgcOrAnd https://networking.ringofsaturn.com/Web/syntax-across-langua..., which is a great resource, but doesn’t even mention Algol in that section.
- adrian_b 5y agoIn 1964, the language IBM NPL, renamed PL/I in 1965 and known now under this name, introduced the symbols "&" and "|" for logical "AND" and "OR", replacing the keywords ".AND." and ".OR.", used by IBM in their previous programming language, Fortran IV. Because the symbols used by IBM were available in all later character sets for computers, unlike the traditional mathematical symbols, almost all programming languages introduced after 1965 have used either the IBM symbols or symbols derived from them ("&&", "||"). The use of backslash was suggested at about the same time, but the PL/I alternative of using a single dedicated character was more convenient. Unlike PL/I, IBM APL\360 used the traditional logical symbols, like Algol, but APL used a special character set anyway, so 2 more or 2 less special characters did not matter.
- JKCalhoun 5y ago> US (Unit Separator), RS (Record Separator), GS (Group Separator), and FS (File Separator) are the only 4 remaining of the 8 information separators (ISi) (or data delimiters) that I put in in 1961 September. And I'm thinking — why not one separator and the byte that follows indicates Unit/Record/Group/File/etc.? Amazing though that we know the moment and the person (and the reason) that specific ASCII characters were added. Were we defining ASCII for the first time now, I suspect the BELL control code would be gone — perhaps replaced by the smiley-face?
- KerrAvon 5y agoJust a guess, but modern readers often forget how precious memory was at that time — an extra byte per record would potentially have been a costly amount of extra storage.
- gerdesj 5y ago"why not one separator and the byte that follows" That's an extra byte ... a whole extra byte! 20 odd years later my ZX80 had 1KB of RAM and a portion of even that was unavailable for the end user. My C-64 had a whopping err 50ish? KB usable RAM. My 80286 1MB. etc. This laptop has 32GB.
- chrismcb 5y agoSure, but they only had 127 characters to play with
- gerdesj 5y ago"I suspect the BELL control code would be gone" I remember my mum getting her first electronic typewriter. It went bing at the end of the line to warn you, just like the old manual jobbies. I guess that was BEL in action. Later models had a buffer that you typed into and then it would spew text onto the paper when it knew what to do with your text to avoid splitting words or whatever lowly skills it had with typesetting.
- colanderman 5y agoI've always been curious, whether any popular systems made good use of US/RS/GS/FS. E.g. I'm surprised never to have seen any support for CSV files using US/RS instead of TAB/(CR)LF or comma/(CR)LF. Or any support in Unix to use RS instead of LF or NUL to delineate records.
- dang 5y agohttps://www.histo.cat/sabies/Bob-Bemer https://www.histo.cat/sabies/Bob-Bemer has tons of interesting information about Bob Bemer, the author of this article, who died in 2004. (I found it while searching around for the year on this article. He seems to have updated it until 2003.) A few interesting mentions of Bemer in the HN archives: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=%22bemer%22&sort=byDate&type=comment https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
- crobertsbmw 5y agoIs there a brace that isn’t curly?
- _kst_ 5y agoIn typical US usage, we have (parentheses), [brackets], and {braces}, but the terms vary regionally in confusing ways. I think the word "parentheses" is unambiguous, but using the terms "square brackets" and "curly braces" avoids confusion.
- jez 5y ago> I scarcely believe that I was the first to use them, being so common in literature, but incorporation in computer sets is a different thing. This begs the question: where did curly braces come from originally? Parentheses are common in prose writing, but I can’t think of why type writers or computers would have all had {} characters if there weren’t a history of their use. Wikipedia doesn’t seem to mention any literary history either (in fact it reference this article as their introduction to ASCII only). I suppose maybe set notation introduced them first? But I know that math notation we use today isn’t always the notation that the inventors used when first proposing ideas, so it’d be interesting to learn who first used curly braces for sets, and whether they invented that symbol or whether printing presses already could print them.