HN.zip

Curly braces: An evolution of Unix and C

37 points by thaliaarchi - 7 comments
ethanlipson [3 hidden]5 mins ago
In the words of my combinatorics professor, Dave Bayer:

> It is hard to shed prejudices about how code should look, even if learning to see clearly past convention is the only good reason to be a mathematician. I'm already quite sure how I will die: I'll read another article on Hacker News about a new programming language where I see nothing new, and I'll read that they included {}; to make C programmers comfortable. I'll have a massive stroke.

readthenotes1 [3 hidden]5 mins ago
"In addition to missing lowercase, ASCII 1963 and the Model 33 lacked { } curly braces, | vertical bar, ` backtick, and ~ tilde, and they had ↑ up arrow instead of ^ caret and ← left arrow instead of _ underscore."

explains why Smalltalk used the up arrow and left arrow for fairly reasonable punctuation for return and assignment.

Up arrow was replaced much later by caret and left arrow was sadly replaced by :=

Joker_vD [3 hidden]5 mins ago
Some BCPL dialects/implementations used underscore instead of := for assignment. MUD 1 was written in such a dialect, see e.g. [0]; also, note that it allowed the use of "." in identifiers.

[0] https://github.com/PDP-10/MUD1/blob/master/MUD3.BCL#L96

0x69420 [3 hidden]5 mins ago
hang about, the smalltalk return operator is why objc block syntax uses carets, isn't it? how did that only just click for me?
mikestew [3 hidden]5 mins ago
Hard to tell from a short comment, and maybe you already know, but a lot of obj-c is derived from smalltalk.
jmclnx [3 hidden]5 mins ago
Interesting. I do not remember exactly what system or language I used in collage, but for some reason I thought a { and } was encoded as [[ and ]] or some kind of double character like that. I new Fortran at the time, but that other language needed '{}'.
dcminter [3 hidden]5 mins ago
You're likely thinking of trigraphs - alternatives to some characters: https://stackoverflow.com/questions/1234582/purpose-of-trigr...