3 ms·
Z/OS is written in, amongst other things, in C/C++. .NET is implemented in C/C++. Dalvik is written in C. And the specification allows for calling into unmana
by nineteen999 8y ago
Z/OS is written in, amongst other things, in C/C++.
.NET is implemented in C/C++.
Dalvik is written in C. And the specification allows for calling into unmanaged code via JNI, mostly for performance reasons.
LLVM is written in C/C++.
Windows, MacOS, Android/Linux kernels are all written in C.
The Swift, Rust, Objective-C communities et al should put their money where their mouth is after all these years, and provide feasible replacements for just _one_ of these consumer systems.
Otherwise it comes off at worst as grandstanding, at best, navel gazing.
Where is the consumer ready Rust replacement for LLVM?
Where is the consumer ready Obj-C replacement for Dalvik?
Where is the consumer ready operating system kernel based on .NET?
Where is the consumer ready Swift library of high performance video codecs?
These languages need some sort of flagship IMHO if they are ever to displace C/C++. Developer mindshare is important to getting critical mass and these languages are fighting each other for it, while C/C++ is still sort of sitting by eating their lunch and getting shit done.
- pjmlp 8y agoFirst of all, there is no such language as C/C++. C++ although tainted by copy-paste compatibility with C89, does offer the language features for security conscious developers to make use of, and C++17 is quite a pleasure to use. C on the other hand could be nuked for what I care, it has been clear since 1979 that security and C would never go together. Now regarding your assertions. z/OS was initially written in a mix of Assembly and PL/I. C and C++ came later into the picture as the system got a POSIX personality. The way to write libraries exposed to all languages available on z/OS is via the z/OS Language Environment. Chapter 9.12 of z/OS Basics, https://www.redbooks.ibm.com/redbooks/pdfs/sg246366.pdf https://www.redbooks.ibm.com/redbooks/pdfs/sg246366.pdf .NET has hardly any pure C code, rather C++. Even so, the C# and VB.NET compilers have been bootstrapped thanks to Rosylin and now C++ is gone from the compiler side. F# was bootstrapped from the early days. Since Roslyn came into production, the .NET team started planning moving parts of the runtime from C++ to C#. "So, in my view, the primary trend is moving our existing C++ codebase to C#. It makes us so much more efficient and enables a broader set of .NET developers to reason about the base platform more easily and also contribute." https://www.infoq.com/articles/virtual-panel-dotnet-future https://www.infoq.com/articles/virtual-panel-dotnet-future Also the first version of .NET's GC was actually prototyped in Common Lisp, https://blogs.msdn.microsoft.com/patrick_dussud/2006/11/21/how-it-all-startedaka-the-birth-of-the-clr/ https://blogs.msdn.microsoft.com/patrick_dussud/2006/11/21/h... Unity introduced HPC# at GDC 2018 and they are now in the process of migrating C++ engine code into HPC#. Both the requirements of HPC# as C# subset for performance critical code, as the experience with Singularity and Midori drove the design of C# 7.x features regarding low level GC free data structure management. "Evolving Unity" https://www.youtube.com/watch?v=aFFLEiDr3T0&list=PLX2vGYjWbI0S8ujCJKYT-mIZf7YCuF-Ka https://www.youtube.com/watch?v=aFFLEiDr3T0&list=PLX2vGYjWbI... "Safe Systems Programming in C# and .NET" https://www.infoq.com/presentations/csharp-systems-programming https://www.infoq.com/presentations/csharp-systems-programmi... "Safe Systems Software and the Future of Computing" https://www.youtube.com/watch?v=CuD7SCqHB7k https://www.youtube.com/watch?v=CuD7SCqHB7k Dalvik was written in C++ and is dead since Android 5.0. ART was written in a mix of Java and C++ between Android 5 and 6 as AOT compiler at installation time. It was rebooted for Android 7, where it is now a mix of an interpreter written in highly optimized Assembly, with JIT/AOT compilers written in a mix of Java and C++, making use of PGO data. On Android Things, userspace device drivers are written in Java. https://developer.android.com/things/sdk/drivers/ https://developer.android.com/things/sdk/drivers/ Sun back in the day toyed with the idea of having Java on the Solaris kernel, https://www.researchgate.net/publication/220938922_Writing_Solaris_device_drivers_in_Java https://www.researchgate.net/publication/220938922_Writing_S... And on SunSPOT devices, http://www.sunspotdev.org/ http://www.sunspotdev.org/ Fiji VM and PTC Perc Ultra can be compiled AOT to native code and run Java bare-metal. https://www.ptc.com/en/products/developer-tools/perc https://www.ptc.com/en/products/developer-tools/perc http://fiji-systems.com/ http://fiji-systems.com/ Oracle is also in the process of following JikesRVM example, and with the help of Graal, bootstrap Java thus reducing the dependency on C++, via the Project Metropolis. https://www.youtube.com/watch?v=OMk5KoUIOy4 https://www.youtube.com/watch?v=OMk5KoUIOy4 Graal, which incidently has better LLVM is written in C++. Yes it does expose a C API, but it also has bindings for other languages. At WWDC 2017, Apple announced that launchd and the dock were rewritten in Swift. I expect other OS components to be announced at this years' WWDC. Windows kernel was written in C. Since Windows 8, C++ is officially supported on the kernel and given the company's stance on usefulness of C, they have been migrating the code to compile as C++. "We do not plan to support ISO C features that are not part of either C90 or ISO C++" https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-and-c99/ https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an... Now Visual C++ has been updated up to C11 library compatibility, as per ISO C++17 compliance requirement, that's all. "We have converted most of the CRT sources to compile as C++, enabling us to replace many ugly C idioms with simpler and more advanced C++ constructs" https://blogs.msdn.microsoft.com/vcblog/2014/06/10/the-great-c-runtime-crt-refactoring/ https://blogs.msdn.microsoft.com/vcblog/2014/06/10/the-great... https://www.reddit.com/r/cpp/comments/4oruo1/windows_10_coded_in_c_or_assembler/d4g9we9/ https://www.reddit.com/r/cpp/comments/4oruo1/windows_10_code... Fuchsia's TCP/IP stack, WLAN services, disk management, package manager, update service are written in Go. https://groups.google.com/forum/#!msg/golang-dev/2xuYHcP0Fdc/tKb1PgTXAwAJ https://groups.google.com/forum/#!msg/golang-dev/2xuYHcP0Fdc... https://fuchsia.googlesource.com/garnet/+/master/go/src https://fuchsia.googlesource.com/garnet/+/master/go/src Genode OS, ARM Mbed OS and Arduino Wiring are written in C++. As I mentioned, change requires replacing generations one person at a time. First lets turn C into the COBOL of systems programming, then we worry about C++ afterwards.
- nineteen999 8y agoThank you for the long list of examples. I think some of them are a little fringe and fall outside the scope of my argument (eg. Sun literally "toying" with Java device drivers, or Microsoft compiling their C code with a C++ compiler), and you haven't refuted my point that the kernels of the most popular systems are still written in C for the most part. Listing endless reams of discontinued research systems (eg. Singularity and Midori) isn't reinforcing your point. Redox (Rust) and Zircon (C++) are more what I'm alluding to. However Redox AFAIK doesn't even have USB drivers yet and Fuschia is even less useful in its current state. These systems have to be available, and I venture, usable, in order to be able to displace eg. Linux which is already both of those things. I'm hopeful we can see more progress in the next few years on some of these. It's nice to see some serious attempts in this space, however with the current pervasiveness of and dependencies on C at so many layers of these systems, I suspect it is really going to take much longer than hoped.
- pjmlp 8y agoSingularity and Midori were killed by political reasons, you just need to see Joe Duffy stories about how it all went down. However .NET AOT compilation on Windows 8 was taken from Singularity Bartok's compiler, while Midori influenced async/await, TPL, improved references on C# 7.x and .NET Native on UWP. I guess you missed my "As I mentioned, change requires replacing generations one person at a time.". So yeah, it is going to take awhile until all those devs and managers that are religiously against safe systems programming are gone, replaced by newer generations with more open mind. The only way to convince Luddites is to wait for change of generations, unfortunately also means one doesn't get to see change him/herself.