News for hackers. Stuff that matters.
Re:Why do programming languages use curly braces? by pjmlp on Tuesday February 26, 2013 @10:59AM (#5286309)
Sadly proper arrays and strings were left somehow along the way.
Re:Why do programming languages use curly braces? by kps on Tuesday February 26, 2013 @11:38AM (#5286613)
BCPL vectors seem to be the same as C arrays, no?

dmr wrote at http://cm.bell-labs.com/cm/cs/who/dmr/bcpl.html that “C was invented in part to provide a plausible way of dealing with characters when one begins with a word-oriented language. [...] BCPL later found a solution better, on its own terms, by providing an operator (%) analogous to its !, such that v%i designates the i-th character in a vector. However, the earliest BCPL applications tended not to process packed characters in vectors, but to spread them out early into one character per word, process, and then pack them again if necessary.”

Re:Why do programming languages use curly braces? by pjmlp on Wednesday February 27, 2013 @02:23AM (#5291123)
I meant about the design decision to ignore what other system programming languages were already offering on those days.

Algol and PL/I already offered what I consider proper arrays and string types.

The performance argument about bounds checking is stupid, because any proper compiler offered the possibility to disable bounds checking for code regions.

Sadly the decision taken was another one with the security consequences everyone was to endure with software written in C. At least C++ offers a way out for the developers that embrace STL and similar libraries.