9 ms·
I don't know if this is my conservatism speaking or not, but one problem I see with this approach is that you wouldn't learn as much because more batteries are
by mveety 9y ago
I don't know if this is my conservatism speaking or not, but one problem I see with this approach is that you wouldn't learn as much because more batteries are included. Having to implement more than just a kernel (like the standard library and userland) gives you more of a chance to learn intangibles like what is or isn't appropriate to include in an API or what programs will actually be useful given your overall design. Also, there could be the problem of not having as many resources available in the language you're writing your OS in. That's a huge deal for a less experienced programmer.
That all being said, Zig looks pretty okay. It would be a good candidate to write an OS if you had to because the standard library looks trivially portable so you could test the userland on a known working kernel before getting it working on your new kernel.
- dom96 9y agoAs an alternative to this you could use Nim[1] which compiles to C. If you, like myself, dislike C, Nim can be used as a "better C" (you can disable the Nim GC and forget about its standard library, then use Nim as a thin layer over C with modules, generics and other nice goodies) 1 - https://nim-lang.org/ https://nim-lang.org/
- NetOpWibby 9y agoI’ve been wanting to learn how to use a real programming language (I’m strictly front-end languages) and Nim looks great at first glance.
- pjmlp 9y agoOther point of view, would be to consider that the language runtime is the OS being implemented.