Hacker News new | ask | show | jobs
by pjmlp 412 days ago
Maybe, however always telling what they should have done won't change the languages position on the market, so we get what we can have.

Many things D might have done it first, yet it is hardly acknowledged, or has any impact on adoption without a major backer.

I also keep telling WG14 should care about security, since Usenet days, fighting windmills.

1 comments

Many features of D have since found their way into C++, such as ranges, compile time function execution, thousands separators in numeric literals, conditional compilation blocks, etc.
Indeed, and with them, the reasons for the industry to care about what D offers sadly diminishes.

Also some of those features predate D, having shown first in Ada, Common Lisp, Eiffel, as discussed in the past.

There's not only the features, but how they are done. D users regularly tell me that it is just so much easier to program in D. Aesthetics do matter.

I've pointed out many times that thousands markers in D came from Ada. However, no other language did them until D did.

Yes, Lisp has compile time function execution. Where it remained until D did it with a compiled language.

C++'s implementation of ranges is still based on pointers (an iterator pair), rather than based on arrays as in D. The language loses semantic information because there is no particular thing that connects the iterator pair as being the limits on an array. Basing ranges on arrays enables crucial things like array bounds checking.

Yes, D's contracts are based on Eiffel. But they also went nowhere until D adopted them.

I forgot to mention - I added contract programming to C++ back in the 80's.

https://www.digitalmars.com/ctg/contract.html