4 ms·
Everyone who has has tried that approach soon after decided to leave the company so they could spend more time with their families... And your right that compi
by generic_user 10y ago
Everyone who has has tried that approach soon after decided to leave the company so they could spend more time with their families...
And your right that compilers etc, do not absolutely need to be written in C/C++. But all of this is taking place in the context of the market. Open source operates in that same market.
If you have two teams working on compilers in different languages and one is using C/C++ its probably going to be much faster with fewer dependencies. 90% of the business is going to go that way and the other team is going under. And so it goes all the way up the stack.
On the other hand what about the kernel and the system libraries? Even if you replaced the whole tool chain with another language but still have a C/C++ kernel and system interface everybody is going to want to use the native interfaces and therefore work in C/C++. So whats the point of adding another layer.
Given what we have now and what peoples expectations are I just don't see 'a replacement for C/C++' ever happening until You can wipe your drive and install a new OS with a kernel and system libraries in a totally different language and never have to touch C/C++ again for the projects developed for that OS.
- sigjuice 10y agoI do not disagree with you even a little, and not just because C is my bread and butter. At this point, I am merely curious about examples of large projects doing a successful switch from language A to language B. I just remembered reading about MirageOS recently. Almost everything is done in OCaml. I am sure it contains a bunch of low-level C code. It seemed interesting, but I don't think such projects will ever replace systems written in C.
- generic_user 10y agoSorry, I can't think of any off of the top of my head. The only thing that comes close is once in a while you see a C project switch to C++ but that's not really an example of what your looking for. Like when GCC switched over to C++.
- pjmlp 10y ago> Even if you replaced the whole tool chain with another language but still have a C/C++ kernel and system interface everybody is going to want to use the native interfaces and therefore work in C/C++. So whats the point of adding another layer. I guess you don't do much OS X, iOS, Android ,ChromeOS or UWP programming.
- generic_user 10y agoI really have no idea what your trying to argue. OSX is a certified UNIX.A bunch of BSD people ended up over there. Android and ChromeOS use the Linux kernel and Redhats C lib. The one time I checked it looked like most of there compositor and components are also C/C++, skia etc. Windows is written in C++ and you have WinAPI. And of course vanilla Linux is C and all the GNU libs are C. So its WinAPI and Linux system interface with a preference for POSIX. With lots of other irreplaceable Libraries that are also only written in C/C++. High performance high memory usage that needs to run stable at full load and maximum memory for days at a time. Keep in mind that there are large industries that have usage and development patters that your oblivious to. And that claims of safety espoused by language developers based on criteria that they themselves have created are so low on the priority stack that there simply non existent in specifications. What should we do? Should Google and Microsoft and The Linux foundation rewrite there whole stack in XYZ meme language? Or is it just all the other companies that that should switch to a language they don't need or care about just for the hell of it?
- pjmlp 10y agoSimple, yes the lower levels of the stack are still C and C++, but that is about it, the very low level layers. OS X, yes it is a certified UNIX, but the software world is more than command line tools and UNIX daemons. Any OS X, iOS, tvOS, iOS application that regular users actually want to use, rely in Objective-C APIs making use of classes, categories and protocols, with some of them actually being nowadays implemented in Swift, like the new audio stack. ChromeOS, yes it is built on the Linux kernel, however the whole stack is built to manage Chrome instances. Only web apps count. Any developer creating applications to ChromeOS only deals with the web stack. Android, oh sure it is built on top of a forked Linux kernel, stripped out of any signs of UNIX V IPC, but regular application developers only see Java APIs. Surely there is the NDK, which exposes about 5% of Android APIs, has a very limited set of official C and C++, and any attempt to link to on-device libraries not part of the sanctioned list, terminates the application, as of Android 7. Windows, sure the kernel is built on a mix of C and C++, both Win32 and UWP build on top of that. However .NET Native is also able to produce UWP components, just like C++/CX. Watch any Microsoft conference since the launch of Windows 10, and you will see in which direction the wind is blowing on the whole .NET Native vs C++/CX for UWP applications. Tizen, yep they built it on top of Linux kernel, offer some native API that has already gone through three reboots, but guess what. The main APIs are their web stack, native is not even allowed on Tizen for TVs and now their are adopting .NET Core as the new API stack. As for POSIX and mobile OS, maybe you haven't been paying attention to the news. "POSIX has become outdated" -- http://www.cs.columbia.edu/~vatlidak/resources/POSIXmagazine.pdf http://www.cs.columbia.edu/~vatlidak/resources/POSIXmagazine...