www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - History of C

reply bearophile <bearophileHUGS lycos.com> writes:
A short article written by Dennis M. Ritchie about the development of the C
language:

http://cm.bell-labs.com/cm/cs/who/dmr/chist.html

It explains me for the first time why for example in function arguments [] can
be used as a pointer to array.

It also explains some mistakes of C design, some of them are fixed by D but
some of them are present still, like (in this case of operator precedence):

    if (a == b & c) ...
That usually you want to write as:
    if (a == (b & c)) ...

Or relative to the syntax of deference:

Sethi [Sethi 81] observed that many of the nested declarations and expressions
would become simpler if the indirection operator had been taken as a postfix
operator instead of prefix, but by then it was too late to change.<

In future the D2 language will enjoy fixing some more of them, where possible. Bye, bearophile
Feb 03 2009
parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Tue, Feb 3, 2009 at 3:44 PM, bearophile <bearophileHUGS lycos.com> wrote:

Sethi [Sethi 81] observed that many of the nested declarations and expressions
would become simpler if the indirection operator had been taken as a postfix
operator instead of prefix, but by then it was too late to change.<


Nested pointer declarations aren't a problem with the D function pointer declaration syntax.
Feb 03 2009