https://www.digitalmars.com/articles/b39.html https://www.digitalmars.com/articles/b40.html
which I learned from mechanical design at Boeing.
Another aspect is making it impossible to assemble parts any way but the correct way. For example, you can write C code like this:
for (i = 0; i < 10; ++i);
do_something();
A colleague of mine, a very good programmer, was stymied by this for a full day. The next day I added a warning to my C compiler for it. As time went on, this warning became commonplace in other compilers.But in D, I didn't make it a warning. I made in an error. A ; cannot be used to create an empty statement, that can only be done with { }. I still can't believe C/C++ have never made that an error.
Another one is:
if (a < b < c) ...
That doesn't do what one thinks it does. So in D it's an error.D is better because so many unnecessary things in C and C++ are minefields, and instead of warning the user, they're just illegal. (All have ways of doing the equivalent if one really needs to.)