← Back to context

Comment by franciscator

12 hours ago

I would love to see more Rust on Plan9 implementations, IMHO, could be a good modern combination.

I don't know. I use a lot of Swift and C++ and while both are OK languages there is an absurd amount of complexity in these languages that doesn't seem to serve any real purpose. Just a lot of foot traps, really. Coming back to Plan9 from that world is a breeze, the simplicity is like a therapy for me. So enjoyable.

If "modern" means complex, I don't think it fits Plan9.

  • As a Swift noob, I would appreciate hearing what these foot traps are. This is in the context of Swift as a systems programming language?

  • I don't know about Swift, but in C++, the complexity serves at least three purposes:

    1. Backwards compatibility, in particular syntax-wise. New language-level functionality is introduced without changing existing syntax, but by exploiting what had been mal-formed instructions.

    2. Catering to the principle of "you don't pay for what you don't use" - and that means that the built-ins are rather spartan, and for convenience you have to build up complex structures of code yourself.

    3. A multi-paradigmatic approach and multiple, sometimes conflicting, usage scenarios for features (which detractors might call "can't make up your mind" or "design by committee").

    The crazy thing is that over the years, the added complexity makes the code for many tasks simpler than it used to be. It may involve a lot of complexity in libraries and under-the-hood, but paradoxically, and for the lay users, C++ can be said to have gotten simpler. Until you have to go down the rabbit hole of course.

AFAIK there is no Rust compiler for Plan 9 or 9front. The project is using a dialect of C and its own C compiler(s). I doubt adding Rust to the mix will help. For a research OS, C is a nice clean language and the Plan 9 dialect has a some niceties not found in standard C.

If you really want Rust, check this https://github.com/r9os/r9 it is Plan 9 reimplemented in Rust (no idea about the project quality):

R9 is a reimplementation of the plan9 kernel in Rust. It is not only inspired by but in many ways derived from the original Plan 9 source code.

I’m fairly sure that Rust compiler is bigger than the entire 9front (and 9front has Doom in it).

  • Since Rust depends on LLVM, which is massive, that is almost certainly true. It seems likely even if you don't include LLVM though.

You would like Golang more than Rust. At leat the authors (and ex-authors) for sure they are aware of Go, they invented it too.