Restricting ++ and --

dsimcha dsimcha at yahoo.com
Sun Oct 25 13:01:56 PDT 2009


== Quote from bearophile (bearophileHUGS at lycos.com)'s article
> d-noob:
> >That would break C compatibility and sounds ridiculous.<
> It breaks C compatibility, but it doesn't assign a new meaning to a C syntax, it
just disallows a syntax used in C, and this is allowed by D philosophy.
> Many of the things I say sound ridiculous :-)
> You may say it's not a handy change and you may refuse it, but I think it's not
a ridiculous idea because those changes lead to code that's equal to how some
expert coders suggest to program to avoid bugs, this is one of them, but I have
seen two more:
> http://users.bestweb.net/~ctips/tip037.html
> So it's a language enforcement of a coding tip/standard.

In other words, bondage and discipline.  The legitimate role of a language
designer for a systems language is to make it hard to shoot yourself in the foot
*by accident* and to provide sane *defaults*.  IMHO no language designer, not even
Walter, should take it upon himself/herself enforce his/her view of "correct" or
"safe" programming style on me through arbitrary restrictions on what the language
can do.

> Bye,
> bearophile




More information about the Digitalmars-d mailing list