Hacker News new | ask | show | jobs
by Manishearth 3771 days ago
Systems programming does not preclude a language from having a good type system or higher level abstractions.

A good example is Phil's OS. http://os.phil-opp.com/. He's designing an operating system in Rust, and it has surprisingly few "unsafe" parts. The rest of it is made safe using some neat zero-cost abstractions.

Higher kinded types isn't going to happen anytime soon. It's something that crops up often in discussions when people want to model something complicated with the type system; but it's a very nontrivial feature that would probably need to wait for Rust 2.0, if ever. Even if it would exist, you can just not use it. Like most of the other features being added.

1 comments

> Systems programming does not preclude a language from having a good type system or higher level abstractions.

I didn't say that system programming does not need a good type system. I am also not saying that it is impossible to design operating system software with Rust.

As someone who had been on both the sides of the abstraction and having closely interacted with the system programmers, I think it is just too hard to convince them to use Rust. It is not just about the language alone, it is about what minimum you need to bootstrap a system (among many other things).

Anyway.. good luck to the OP in "rewriting everything in rust" and also getting it to the same quality/feature parity as others in the game and also get others to use it as well.

> does not need a good type system

Yeah, I'm just saying that "higher kinded types" (which, again, Rust isn't getting anytime soon), does not make Rust something that isn't targeting systems programming; in response to "you folks are really targeting C/System programmers".

Many of Rust's designers are experienced systems programmers. A _lot_ of effort goes into making it systems-ready.

> it is about what minimum you need to bootstrap a system

Rust works on any target LLVM compiles to, and you can opt out of the standard library if you're writing baremetal things. There already are people writing low level Rust things.

But yeah, I know the skepticism you refer to; seen it in action before. But in the case of Rust I've rarely seen any concrete points being brought out (aside from perhaps "LLVM doesn't target enough things", which is fair). The language developers do try to take input from everyone and make it more systems ready; but there really isn't much that can be done when there isn't any input other than a strong preference for C.

> Many of Rust's designers are experienced systems programmers. A _lot_ of effort goes into making it systems-ready.

That is promising. Thanks. I am certainly playing with it at home.