Treating the abusive unsigned syndrome

bearophile bearophileHUGS at lycos.com
Wed Nov 26 08:19:13 PST 2008


Kagamin:
>that thread is about an extra compiler warning (which is always good), not about breaking C syntax.<

You seem unaware of the current stance of Walter towards warnings. And please don't forget that D purposes are different from C ones (D is designed to be safer, especially if this has little or no costs), and that D comes after a long experience of coding in C, and that D runs on machine thousands of times faster than the original ones the C language was designed for (today having fast kernels in your program is more and more important. Less code uses most of the running time).

And that thread was more generally an example that shows why that specific C syntax is error-prone, and it also explains why some languages, among them there's Python too but it's not the only one, have refused this specific C syntax.

Note that there are several other C syntaxes/semantics that are error-prone, and thanks Walter D already fixes some of them, and I hope to see more improvements in the future.


>And I don't think that there is a method to make && a syntax error as you proposed.<

Keeping two syntaxes to do the same thing is a bad form of complexity. Generally it's better to have only one obvious way to do something :-)

Bye,
bearophile



More information about the Digitalmars-d mailing list