2 ms·
C++ should finish the job and deprecate the preprocessor.
by WalterBright 3y ago
C++ should finish the job and deprecate the preprocessor.
- gpderetta 3y agoModules get rid of includes and includes guards. Unfortunately the preprocessor is still needed for stringyfication and other symbol manipulation. C++26 (2126 of course) will introduce enough reflection to finally get rid of the preprocessor.
- WalterBright 3y agoI added enough to D that it didn't need a preprocessor, yet could do all those things.
- shadowgovt 3y agoI really need to get around to looking into D.
- FpUser 3y agoWhen D showed up I really wanted it to become mainstream language. Unfortunately it did not.
- WalterBright 3y agoDoesn't mean you can't use it. Lots of people do.
- pjmlp 3y agoIt does, because many delivery projects chose languages based on the product SDKs, so if it isn't in the box, they don't come into the discussion at all. Also in the meantime, most of the cool stuff in D is showing up on the languages that come on those SDKs (C++, Java, C#), weakening the argument to look outside of SDK supported languages. Doesn't matter if D had it first, or if it has a better implementation, worse is better, when ecosystem, tooling, IDE and technical support are part of the equation. So it remains a language for hobby coding.
- WalterBright 3y agoD is shipped as part of the Gnu compiler project. > most of the cool stuff in D is showing up on the languages It's true that many aspects of D are copied by other languages, but badly.
- pjmlp 3y agoAt most GCC could be considered as a piece of the Linux SDK, but that wasn't the kind of SDK I was talking about, rather a full end to end product SDK. Badly copied doesn't matter, it is one reason less to look for where it came from.
- FpUser 3y agoAll of my many products are commercial. I mostly have freedom to choose language. But I am also my own software development company and I have never felt brave enough to leave my client/s with the mountain of D code and no one to help after I went to develop next product somewhere else. This is very unfortunate.
- gpderetta 3y agoI'm sure that D compile time facilities can do it all right. The issue is that the C++ bits (compile-time introspection) will never be standardized.
- shadowgovt 3y agoTo be honest, if that happened I'd be 100% on board. My issue is combinatoric complexity, not a new way to do things. I'm not frustrated that we have constexpr; I'm frustrated I now have to worry about how it interacts with macros and namespaces and lifetimes and oh what if the values are templates and so on. Each feature adds superlinear cost to understanding the language and the code you're reading.