\

Curly braces: An evolution of Unix and C

38 points - last Wednesday at 5:49 PM

Source
  • ethanlipson

    today at 4:36 PM

    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.

      • hyperhello

        today at 8:17 PM

        {} are important signals that code can and will branch at those points. They’re fundamental to reading.

    • today at 4:34 PM

      • readthenotes1

        today at 4:31 PM

        "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

            today at 6:50 PM

            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

              today at 6:01 PM

              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

                  today at 6:39 PM

                  Hard to tell from a short comment, and maybe you already know, but a lot of obj-c is derived from smalltalk.

          • jmclnx

            today at 4:16 PM

            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 '{}'.

          • NicoHartmann

            today at 7:28 PM

            [dead]