News for hackers. Stuff that matters.
Re:Fuchsia is not Linux by pjmlp on Thursday April 12, 2018 @02:45AM (#16818548)
No, but exceptions aren't the only way to handle errors in C++.

There are also library types that enforce checking for errors, something currently impossible in C.

Also thanks to its stronger type system, it is possible to do type driven programming thus preventing many errors to happen at all, which is also not possible in plain C.

Finally everyone is moving to C++, C for OS development is stuck on UNIX and embedded devs that wouldn't use anything else even at point gun.

Re:Fuchsia is not Linux by naasking on Thursday April 12, 2018 @08:50AM (#16820313)
> There are also library types that enforce checking for errors, something currently impossible in C.

This is a weak form of checking for a kernel. L4 Hazelnut was written in C++ for this reason, but they didn't use it much, mirroring Shapiro's experience with EROS. And when they had to revise the kernel design to plug security holes and they wanted to formally verify its properties, they switched to C because C++ was too complex and left too much behaviour unspecified, and thus we got verified seL4 written in C.

Re:Fuchsia is not Linux by varjag on Thursday April 12, 2018 @03:49AM (#16818795)
C++ has shrunk a lot in the mindshare since its peak in mid-90s. And Rust is the trendy thing now in the same space.
Re:Fuchsia is not Linux by pjmlp on Thursday April 12, 2018 @04:24AM (#16818961)
Only if we are speaking about enterprise CRUD apps that used to be done in MFC, OWL, VCL, Motif++.

OpenCL lost to CUDA because it did not natively supported C++, only when it was too late.

NVidia has designed Volta specifically to run CUDA C++ code.

There is no C left on game consoles SDKs or major middleware engines.

All major C compilers are written in C++.

Microsoft has replaced their C runtime library by one written in C++, exposing the entry points as extern "C".

Beyond the Linux kernel, all native parts on Android are written in C++.

The majority of deep learning APIs being used from Python, R and friends are written in C++.

Darwin uses a C++ subset on IO Kit, and Metal shaders are C++14.

AUTOSAR has updated their guidelines to use C++14 instead of C.

All major modern research OSes are being done in C++, like Genode.

Arduino Wiring and ARM mbed are written in C++.

As for Rust, while I do like it a lot, it still cannot compete with C++ in many key areas, like amount of supported hardware, GUI frameworks and available tooling.

Re:Fuchsia is not Linux by Matthias247 on Friday April 13, 2018 @09:10AM (#16829613)
> AUTOSAR has updated their guidelines to use C++14 instead of C.

Really? Interesting thing. You mean for "standard/legacy" autosar, or for the new "dynamic" variant?

When I was back in automotive, the autosar design(s) where probably the ones software people were mostly complaining about.

Re:Fuchsia is not Linux by pjmlp on Sunday April 15, 2018 @08:18AM (#16842345)
BMW were the ones pushing it.

I am no expert there, learned it from their presentation at FOSDEM last year.

https://archive.fosdem.org/2017/schedule/event/succes_failur...

Page 12 on the second slideset.

Re:Fuchsia is not Linux by lemoncucumber on Friday April 13, 2018 @02:31AM (#16827560)
IOKit dates to c. 2000 so it’s hardly a modern example and even people at Apple bitch about the fact that they went with C++.
Re:Fuchsia is not Linux by pjmlp on Sunday April 15, 2018 @08:20AM (#16842352)
Most likely because they dropped Objective-C driver framework from NeXTSTEP.

They are surely a vocal minority, otherwise Metal shaders wouldn't be C++14.