On Sunday, 29 October 2023 at 18:12:46 UTC, Abdulhaq wrote:
> C++ is the low risk option, for a typical business, because it will still be around in 20 years, it will be well maintained, you will always be able to find a pool of developers who can maintain your code, it will link and compile with thousands of industry standard libraries, frameworks, protocols, hardware platforms.
So D is higher risk in that you may find yourself having to spend time (and much money) coding up your own libraries and hardware support. In 10 years time you might struggle to find D developers. However, the reward with D is that you can achieve the required functionality, over the next few years, much more quickly (i.e. more cheaply) than with C++.
There's a lot of speculation in those two paragraphs. The risk with D (using your definition of risk) is non-zero, but not much greater than zero. If nobody is using D in ten years, which is a very low probability scenario, you can compile the existing D codebase and call it from C++ just like you'd call any C code.
While C++ will be around in 20 years, the cost of maintaining the code could be high enough that it's not worth it. A real danger with C++ is that it's not the first choice of new developers. In 20 years you might be competing for talent with the finance industry. That's a battle few companies are going to win.
You're also ignoring everything that takes place from now until 2043. Higher cost of code development and maintenance is quite a liability to ignore as "not a risk".