News for hackers. Stuff that matters.
Re:Why hasn't D started to replace C++ by Someone1234 on Tuesday January 30, 2018 @10:41PM (#16271091)
I believe a related question to ask is: How many new projects are started in that niche?

C still seems to spawn new software because people are working directly with hardware and don't wish to code using straight assembly. I'm thinking computer engineering related fields. Robotics for example.

C++ falls into an uncanny valley, it is neither high level language with all of the benefits (e.g. programmer efficiency, certain security guarantees, lower barrier to entry) or a completely low level language (or at least it isn't if you want to benefit from most of C++'s advantages over straight C; you'll avoid a garbage collector but not a lot of "magic" behind the scenes).

C++ carved out a space with 3D gaming for a while but with many development houses moving to licensed game engines or targeting mobile platforms C++'s benefit may be waning.

The data does support this supposition[0].

[0] https://www.tiobe.com/tiobe-index/cplusplus/

Re:Why hasn't D started to replace C++ by electricslpnsld on Tuesday January 30, 2018 @11:11PM (#16271221)
> C++ falls into an uncanny valley, it is neither high level language with all of the benefits (e.g. programmer efficiency, certain security guarantees, lower barrier to entry) or a completely low level language (or at least it isn't if you want to benefit from most of C++'s advantages over straight C; you'll avoid a garbage collector but not a lot of "magic" behind the scenes).

There are lots of high-level, cost free niceties that C++ provides that I miss when I have to fall back on C. Generics and RAII alone are quite nice.

Re:Why hasn't D started to replace C++ by bitL on Tuesday January 30, 2018 @11:09PM (#16271212)
Advanced robotics is utterly dominated by C++.
Re:Why hasn't D started to replace C++ by fooker on Wednesday January 31, 2018 @12:25AM (#16271621)
Advanced everything is utterly dominated by C++.
Re:Why hasn't D started to replace C++ by AstralStorm on Wednesday January 31, 2018 @03:32AM (#16272402)
Not lower bit microcontroller programming which is still dominated by C. (Because C++ compilers do not exist or produce worse code.)
Re:Why hasn't D started to replace C++ by fooker on Wednesday January 31, 2018 @08:01AM (#16273476)
>Because C++ compilers do not exist or produce worse code.

I am surprised this is still true in 2018. GCC and Clang on x86 with -fno-rtti and -fno-exceptions produce almost identical code for similar programs in C and C++.

If what you say is true, I suppose there aren't enough compiler devs paid to optimize C++ for those platforms.

Re:Why hasn't D started to replace C++ by pjmlp on Thursday February 01, 2018 @02:21AM (#16280156)
GCC and Clang are not even a thing in most microcontrollers.

You buy the compiler from the same vendor that is selling you the hardware.

Even if it is based on gcc, it happens to be a fork with changes they don't easily release. Some of them are now transitioning to clang, because the license makes it easier to keep doing so.

Many of them are still mostly C89 (not 100% ANSI C compliant due to hardware limitations) with a few C99 features.

Re:Why hasn't D started to replace C++ by AstralStorm on Wednesday January 31, 2018 @11:43AM (#16275177)
Exactly the point. Keil doesn't care and gcc devs on smaller platforms are almost always volunteers.

Clang/LLVM is not even close to supporting something lower bit.