5 ms·
Isn't this a circular argument: C is popular because no other language on the top popularity chart does <x>. There are many languages with the these properties
by fulafel 9y ago
Isn't this a circular argument: C is popular because no other language on the top popularity chart does <x>.
There are many languages with the these properties and better safety, but they aren't popular like C.
- bsder 9y agoReally? I'd love their names. I'm not being snarky here. I'd love to have a nice language alternative to C.
- fulafel 9y agoI'm going to link to pjmlp's comment who knows more about these: https://news.ycombinator.com/item?id=14700251#14701140 https://news.ycombinator.com/item?id=14700251#14701140 I was more referring to the historical perspective of how C became popular, many have fallen by the wayside. Though there are certainly current alternatives to C besides those on TIOBE. Also there are real-time extensions to current GC'd languages like Java. (Though standard C isn't very predictable timing-wise either, or suited to real-time work)
- bsder 9y agoAnd, 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?
- fulafel 9y agoI 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 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.
- pjmlp 9y agoApple switched away from Pascal due to UNIX market pressure. http://basalgangster.macgui.com/RetroMacComputing/The_Long_View/Entries/2011/5/28_MacApp_-_evolution.html http://basalgangster.macgui.com/RetroMacComputing/The_Long_V... http://basalgangster.macgui.com/RetroMacComputing/The_Long_View/Entries/2010/9/25_A_UX.html 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/ https://www.mikroe.com/mikropascal/ Any embedded application using Ada's Ravenscar profile, is an OS. https://en.wikipedia.org/wiki/Ravenscar_profile 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.
- bsder 9y agoSo, C, Pascal, and Ada with a smidge of effectively dead languages. Okay, sad to know I'm not missing anything.
- deleted 9y ago[deleted]