Please stop polluting D 2.0 with C/C++ programmer assumptions.

bearophile bearophileHUGS at lycos.com
Sat Dec 1 04:53:51 PST 2007


Aziz K. Wrote:
> C style array decls are easy to parse. C style function pointers were a  
> bit harder to parse though.

Generally having two different but similar syntaxes to express the same thing is a quite bad thing for a programming language, because they add complexity to the language, the parser, make the manuals longer, it's confusing if you read code written by other people that keeps mixing the two, etc.
Regarding the C-style array declarations, I don't like them, but I think they don't damage D much.
The C-style function pointers aren't readable enough, and D has already a better (but probably too much long, "fun" or "func" or "def" or something like that is shorter than function) syntax, and I think the old syntax may be dropped...

Bye,
bearophile



More information about the Digitalmars-d mailing list