Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The main competitor to UNIX namely VAX/VMS is mainly written in C and also its natural successor Windows NT kernel, it is probably the second most popular OS in the world. The more modern BeOS and MacOS kernels are written in C. Even the popular JVM (equivalent to Java mini OS) is written in C. Why are these UNIX alternatives have chosen to use C while other alternative programming languages are readily available at the time for examples Pascal, Objective C and including the safe Ada?

And do the mainframe OSes were written for portability in the first place like UNIX?



VAX/VMS was written in BLISS, it only adopted C after UNIX started to widespread and they needed to cater to competition and their own in-house UNIX implementation, learn history properly.

https://en.wikipedia.org/wiki/BLISS

The even the popular JVM is written in a mix of Java and C++, with plans to port most of the stuff to Java, now that GraalVM has been productised, https://openjdk.java.net/projects/metropolis/

Speaking of which, there are at least two well known version of the JVM written in Java, GraalVM and JikesRVM. Better learn the Java eco-system.

UNIX was written in Assembly for the PDP-7, C only came into play when they ported it to the PDP-11 and UNIX V6 was the first release where most of the code was finally written in C.

IBM i, z/OS or Unisys ClearPath in 2020, have completly different hardware than when they appeared in 1988, 1967 and 1961 respectively, yet PL/S, PL/X and NEWP are still heavily used on them. Looks like portable code to me.

Mac OS, you know the predecessor for macOS, was written in Object Pascal, even though eventually Apple added support for C and C++, which than made C++ with PowerPlant the way to code on the Mac, not C.

BeOS, Symbian were written in C++, not C.

Outside of the kernel space, Windows and OS/2 always favoured C++ and nowadays Windows 10 is a mix of .NET, .NET Native (on UWP) and C++ (kernel supports C++ code since Windows Vista).

NeXT used Objective-C in the kernel, that's right, NeXT drivers were written in Objective-C. Only the BSD/Mach stuff used C.

macOS replaced the Objective-C driver framework with IO Kit, based on Embedded C++ again not C. Nowadays with userspace drivers the C++ framework is called DriverKit in homage to the original Objective-C NeXT framework.

Arduino and ARM mbed are written in C++, not C.

Android uses C only for the Linux kernel, everything else is a mix of Java and C++, and since Project Treble you can even write drivers in Java, just like in Android Things allowed to since version 1.0.

Safe Ada is used alongside C++ on the GenodeOS research project.

Inferno, the last iteration of the hacker beloved Plan 9, uses C on the kernel and the complete userspace makes use of Limbo.

F-Secure, you might have heard of them, has their own bare metal Go implementation for writing firmware and is used in production via the Armory products.

IBM used PL.8 to write a LLVM like compiler toolchain and OS during their RISC research and only pivoted to Aix, because that was what the market wanted RISC for.

Contrary to the cargo cult that Multics was a failure, the OS continued without wihtout Bell Labs and was even assessed to be more secure by DOJ thanks to its use of PL/I instead of C.

There is so much to the world of operating systems than the tunnel vision of UNIX and C.


Personally I'd consider C++ as C with classes or object oriented extension of C, prior to 2010. The modern C++ after that is more of a standalone language after some other languages' features adoption (e.g. D). Objective-C on the other hand is totally a separate language.

The original JVM written by Sun was in C not C++ or Java.

Windows NT the kernel part is mainly written in C. The chief developer of Windows NT Dave Cutler is probably the most anti UNIX person in the world, but the fact that he has chosen C to write Windows NT kernel in C is probably the biggest testament you can get. Dave Cutler is also part of the original developers of VMS, if BLISS with its typeless nature is better for developing OS than C, he'd probably has chosen it.

For whatever reasons Multics had failed to capture wide spread adoption compared to UNIX and the fact that its name existed mainly in most of operating System books as pre-cursor OS to UNIX. For most people Multics is like B language that is just a pre-cursor to C language. I know it a shame that Multics had become a mere footnotes inside OS textbooks despite its superior design compared to UNIX.

PL/I language is interesting by the fact that it is quite advanced at the time but as I mentioned in my original comments, Dennis Ritchie had to accommodate the fact that some of languages features are over engineered based on the hardware of the day and had to compromise accordingly. Go designers, however, have chosen to compromise not based on the hardware state-of-the-art but what the language designers think are good for Google developers at the time of the original language design proposal.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: