4 ms·
Agree. "C" to OS, Kernel, Computer Language, applications is like oxygen is to life on earth. Yes, O2 causes fire from time to time, but you can't live withou
by tkinom 11y ago
Agree.
"C" to OS, Kernel, Computer Language, applications is like oxygen is to life on earth.
Yes, O2 causes fire from time to time, but you can't live without it.
- cbd1984 11y agoDo you know of a language called "C", as opposed to C?
- cbd1984 11y ago> "C" to OS There's the solution! Replace C with "C", a garbage-collected version of C! The quotes mean it's safe! /s
- cbd1984 11y agoI say we should write it in "Rust", as opposed to Rust.
- dh997 11y agoThe analogy is wrong because most all languages are Turing complete, and therefore equivalent despite paradigm and feature differences. The main reason seL4 was written in Haskell and again in C was to cross-verify behavior. C might be legacy ubiquitous, however it doesn't have to be the last word in shared library development by any means. Any language which has a toolchain which produce flat binaries or use link scripts to specify sections can potentially be used for kernel and os dev. Bonus points for a toolchain which can compile itself. There are kernels written entirely in Rust with some assembly glue. Others are writing production embedded domain-specific OSes in Haskell, OCaml, etc. for real, mission-critical systems right now and have been doing so for the last 5-10 years. C inherently or inadvertently leads to giant codebases and subtle bugs when used too liberally, as opposed to higher-level, statically-compiled languages like Haskell and others. The main issue with legacy code is how we choose to either keep investing effort in putting fingers into the levees or try something new in an incremental fashion. PS: I would like to see Go get with it and support non-usermode, self-hosted and embedded development without including a giant, hard-to-port runtime in everything.
- cyphar 11y ago> The main reason seL4 was written in Haskell and again in C was to cross-verify behavior. seL4 was modeled in Haskell, then written in C. Then they used tools to verify that the Haskell models matched the C code.