Re:On the history and justification of the C programming lan...
by nickpsecurity on Thursday August 18, 2016 @06:35PM
(#12316798)
"I assume the author meant Bjarne Stroustrup for items 20 and 21. It's spelled wrong twice, as Bjourne and Bjourn."
Thanks for the catch. No telling how many ways I've messed his name up.
"What does the author propose instead? Is there a major OS that has a kernel not written in C?"
There's a lot of languages you can use in place of C that are fast, safer, can do low-level stuff, and sometimes compile faster. Any of Wirth's are an example. Modula-3 was cleanest at negotiating among many tradeoffs, Modula-2 being one of simplest built on PDP-11, & FreePASCAL well-supported on many architectures. Ada w/ SPARK is the most thorough in removing defects but steepest learning curve. C++, coded like C++ not C, has significant advantages over C with Ironclad C++ adding lots of safety. Its unofficial, successor D language is even better esp w/ SafeD subset. Rust is promising with many advantages over C, strong integration w/ C apps, and temporal/concurrency safety features. PreScheme, in Scheme48, was a fast, simple, low-level LISP that compiled to C or ASM if you modified it. Advantages of C and Scheme but no GC. COGENT at NICTA is functional language for easier, formal verification plus verified compilation to C. Amateurs rewrote ext2 in it successfully. There's a few.
Far as OS's, eh it's more about how we should incrementally re-write or improve them as OS market is a done deal. Components are simply too huge to replace, although embedded has potential. There were OS's not written in C. Examples include ultra-reliable AS/400 (used PL/S), OpenVMS (used BLISS & macros), Oberon System (A2 Bluebottle is latest), Edison System on PDP-11, many in C++, a few in Ada (including OSS Martes), JX OS in Java, and (recent/active) Redox in Rust. Lots of academic or hobbyist stuff including Mesa (Xerox Palo Alto language inspired Modula's/Java), COSMOS (C#), JNode (Java), House (Haskell), and LISP machine clones. It can definitely be done and gradually if language is designed for clean integration with C codebases.
Thanks for the catch. No telling how many ways I've messed his name up.
"What does the author propose instead? Is there a major OS that has a kernel not written in C?"
There's a lot of languages you can use in place of C that are fast, safer, can do low-level stuff, and sometimes compile faster. Any of Wirth's are an example. Modula-3 was cleanest at negotiating among many tradeoffs, Modula-2 being one of simplest built on PDP-11, & FreePASCAL well-supported on many architectures. Ada w/ SPARK is the most thorough in removing defects but steepest learning curve. C++, coded like C++ not C, has significant advantages over C with Ironclad C++ adding lots of safety. Its unofficial, successor D language is even better esp w/ SafeD subset. Rust is promising with many advantages over C, strong integration w/ C apps, and temporal/concurrency safety features. PreScheme, in Scheme48, was a fast, simple, low-level LISP that compiled to C or ASM if you modified it. Advantages of C and Scheme but no GC. COGENT at NICTA is functional language for easier, formal verification plus verified compilation to C. Amateurs rewrote ext2 in it successfully. There's a few.
Far as OS's, eh it's more about how we should incrementally re-write or improve them as OS market is a done deal. Components are simply too huge to replace, although embedded has potential. There were OS's not written in C. Examples include ultra-reliable AS/400 (used PL/S), OpenVMS (used BLISS & macros), Oberon System (A2 Bluebottle is latest), Edison System on PDP-11, many in C++, a few in Ada (including OSS Martes), JX OS in Java, and (recent/active) Redox in Rust. Lots of academic or hobbyist stuff including Mesa (Xerox Palo Alto language inspired Modula's/Java), COSMOS (C#), JNode (Java), House (Haskell), and LISP machine clones. It can definitely be done and gradually if language is designed for clean integration with C codebases.