

The history of curly braces - bbunix
http://www.bobbemer.com/BRACES.HTM

======
thristian
The article mentions that at one point the ASCII standard moved the alphabetic
characters one space to the left, because the author happened to have examined
a phone directory while visiting Copenhagen and noted that Denmark sorts its
three accented characters at the end of their alphabet.

An interesting trivium: the IRC protocol lets users choose their own
nicknames, and demands that nicknames be compared in a case-insensitive
manner. For the purposes of IRC, you must treat {|} as the 'lower-case'
versions of [\\], because IRC was invented in Scandinavia and it did indeed
use those character-codes for accented characters.

~~~
e12e
And here I suspected you were trolling... (in that case, if you've
successfully trolled the RFC - more power to you :)

<http://tools.ietf.org/html/rfc2812#section-2.2>

" 2.2 Character codes

    
    
       No specific character set is specified. The protocol is based on a
       set of codes which are composed of eight (8) bits, making up an
       octet.  Each message may be composed of any number of these octets;
       however, some octet values are used for control codes, which act as
       message delimiters.
    
       Regardless of being an 8-bit protocol, the delimiters and keywords
       are such that protocol is mostly usable from US-ASCII terminal and a
       telnet connection.
    
       Because of IRC's Scandinavian origin, the characters {}|^ are
       considered to be the lower case equivalents of the characters []\~,
       respectively. This is a critical issue when determining the
       equivalence of two nicknames or channel names."

------
vanderZwan
As much as they are hated by some, there's empirical data indirectly
suggesting that using curly braces for scoping might lead to less mistakes
when reading code:

> _Similarly, the twospaces version of counting demonstrated that vertical
> space is more important then indentation to programmers when judging whether
> or not statements belong to the same loop body. Programmers often group
> blocks of related statements together using vertical white space, but our
> results indicate that this seemingly superficial space can cause even
> experienced programmers to internalize the wrong program._

<http://arxiv.org/abs/1304.5257>

Of course, whether or not curly braces significantly help in this situation
would require another experiment. Anecdotally though, I do feel like it
requires less mental effort to structure code that I'm reading.

------
pygy_
He mentions thqt the backslash was added to the character set to allow the
representation of boolean operators when paired with its forward cousin:

    
    
        A /\ B \/ C
    

I wonder why that notation was abandoned in programming languages.

~~~
chinpokomon
& and ^ are just one character? Actually I think you could use both to
disambiguate between logical and bitwise. I'm not sure if it is a good idea
yet, but it would force the developer to see them as different operations;
something that easily confuses beginners.

------
Aardwolf
My opinion about ASCII:

Why is there a back tick ` but no mirrored version of it (the ' is not)?

Why is there no degree symbol in it?

Why did they make most the first 32 symbols useless codes instead of also
symbols?

Why did they have to start the whole "newline vs carriage return" thing, why
not just a single newline character from the beginning?

Why is there no pilcrow, paragraph symbol, dagger and double dagger in it?

Why no symbols for not equals, subset, intersection, union, (no) element of,
AND, OR in it?

Why is it 7-bit and not 8-bit? Who uses 7 bits, honestly.

Programming languages would have had some nicer symbols available if some of
the above were done...

~~~
pwg
> Why did they make most the first 32 symbols useless codes instead of also
> symbols?

Why the first 32. Symmetry. Look at the table here:
[https://commons.wikimedia.org/wiki/File:ASCII_Code_Chart-
Qui...](https://commons.wikimedia.org/wiki/File:ASCII_Code_Chart-
Quick_ref_card.jpg)

Four groups of 32, each group differing in only one bit position.

Why were the first 32 devoted to "control" codes? Because ASCII appeared in
the days of mechanical paper teletype interfaces to computers and so there was
a need for codes to control the teletype. Additionally the intent was to use
other of the control codes for "control" (i.e., use of XON (control-q) and
XOFF (control-s) for flow control).

> Why did they have to start the whole "newline vs carriage return" thing,

Because when you have a mechanical paper teletype printer as your interface to
the computer, the teletype printer needs to be told to do two things:

1) return the print carriage to the left margin

2) roll the paper up one line

Having the ability to do both independently (for a paper printer) allows for
simulating some otherwise impossible effects (i.e., bold face).

> Why is it 7-bit and not 8-bit?

To allow bit 8 to be used for a parity bit for data transmission purposes.

> Why is there no pilcrow, paragraph symbol, dagger and double dagger in it?

> Why no symbols for not equals, subset, intersection, union, (no) element of,
> AND, OR in it?

Likely because, after choosing to make a 7-bit code (to allow bit 8 to be
parity), there is only so much room left in only 128 slots.

~~~
lanna
> Four groups of 32, each group differing in only one bit position.

That's impossible. If you have four groups, they have to differ in at least
TWO bit positions.

------
jckt
Google's cache here (as it seems down for some people):

<http://goo.gl/PWIme>

