Hacker News new | past | comments | ask | show | jobs | submit login

And, with the exception of Ada and Pascal, most of those language have been dead for at least 20 years--for various good reasons.

And, please do remember that Apple switched away from Pascal when writing its operating systems in spite of an enormous code base. That's pretty damning--apparently C's "undefined behavior" didn't seem to matter.

So, we're back to: the only alternative to C is Ada.

> Though there are certainly current alternatives to C besides those on TIOBE.

Let me make it easy. Give me a list of languages that have been used to build an operating system in a product in the last 20 years. It doesn't have to be Linux, even a small RTOS counts.

I'll start the list:

C family--C, C++, ObjC/Swift

Forth(?)--probably counts as it runs on pretty bare metal

Ada--not sure anybody has used it to build an OS, but I don't debate that they could

Rust--has a feature set of articles about this

Pascal--the original Lisa and Macintosh OS (probably stretching that 20 year limit a bit).

And?




Apple switched away from Pascal due to UNIX market pressure.

http://basalgangster.macgui.com/RetroMacComputing/The_Long_V...

http://basalgangster.macgui.com/RetroMacComputing/The_Long_V...

And it was mostly to C++, not C.

Pascal is used daily for embedded system work by MikroElektronika customers using mikroPascal.

https://www.mikroe.com/mikropascal/

Any embedded application using Ada's Ravenscar profile, is an OS.

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

Additionally regarding Pascal, it was used to build Corvus Systems OS, MicroEngine and Solo OS.

Modula-2 was used to build Lilith and Delco's engine control units.

Mesa was used to create Xerox Star workstation.

ESPOL followed by NEWP was used for Burroughs B5500 in the 60's, nowadays still sold by Unisys as ClearPATH.

IBM created their RISC architecture OS using PL/8, with a compiler architecture that now re-resurfaced in LLVM.

OS/400, nowadays known as IBM i, was originally written in PL/I.

If it wasn't for UNIX's adoption, C would have joined many of those languages many moons ago.


So, C, Pascal, and Ada with a smidge of effectively dead languages.

Okay, sad to know I'm not missing anything.


I am happy with your list of languages to write an OS in, maybe add D and Oberon. I'd point out that you can also use managed languages, see MS Singularity, or the various Lisp and Smalltalk operating systems, or the UCSD P-system, etc - there is a list at https://en.m.wikipedia.org/wiki/Language-based_system .

Counting new commercial operating systems is not a useful benchmark as they are very rare, and we already agreed that the alternatives are not popular.




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

Search: