4 ms·
>The biggest issue with all of these "write a new operating system in my favorite language X" (where X is Ada, C, C++, D, Rust, etc) is that in almost all cases
by SkyMarshal 7y ago
>The biggest issue with all of these "write a new operating system in my favorite language X" (where X is Ada, C, C++, D, Rust, etc) is that in almost all cases the operating system design slowly morphs into a buggy, half-baked version of an existing operating system.
The whole point of writing a new OS in a language that prioritizes memory safety and provable correctness, like Ada or Rust, is specifically to explore the possibility that by using a better language, the OS won't morph into a buggy spaghetti code thing.
Safe languages impose fundamental constraints on the complexity of the system, that C/C++ and others do not, and eliminate entire classes of bugs and vulnerabilities at the compiler level.
People wonder why all our systems these days are insecure and getting hacked left and right. Provably correct software and compiler-enforced memory safety are two tools that will be part of the solution (maybe not sufficient, but absolutely necessary).
- thesuperbigfrog 7y agoI agree that using a safe language is a necessity, especially for safety critical environments and to ensure better security. But a safe language alone does not ensure a good design. Ada is a great language (although strings are a bit of a pain), but that alone will not ensure a good operating system design. POSIX is a great standard, but it is too tightly coupled with C. If a similarly mature and open Ada-based standard could be designed and created, that would be great. If such a design were created, what would it look like? How would files be represented and stored? How would you start, stop, or communicate with tasks? (POSIX-style signals? Rendezvous? Something else?) There needs to be an open design that is as well thought out as the Ada programming language to really take advantage of everything that it offers.
- zozbot234 7y agoThere's an official Ada binding for POSIX.
- thesuperbigfrog 7y agoDo you have a link to the documentation? I am aware of Interfaces.C and the non-standard but highly-useful GNAT.OS_Lib. Any others would be nice to know about. POSIX is a mature set of APIs and designs, but it is C-centric. It is an impedance mismatch discards many of the advantages of using Ada in the first place.