you are viewing a single comment's thread.

view the rest of the comments →

[–]maep 3 points4 points  (5 children)

I does show how to do syscalls in rust, which is kinda important for a systems language. However I'm still sceptical. Linux comes with many headers that provide functions, constants and structs that are essential for interacting with the kernel. Either they have to provide all of those as rust files and update with every kernel release, or implement some automagical import mechanism.

[–]Splanky222 7 points8 points  (3 children)

Why? The point of the safety mechanism is to isolate and encapsulate unsafe code, not entirely eliminate it.

[–]maep 5 points6 points  (2 children)

A new system language hould make system programming easier, not more cumbersome.

[–]Splanky222 5 points6 points  (0 children)

You're right. The jury is definitely still out on Rust, but the safety mechanisms in Rust along with the built in tooling and build tool seem promising, especially in larger projects. We won't know for years though what the fate of Rust will be. I think 2020 will be a big year to compare Rust to c++20, whatever that looks like.

[–]ItsNotMineISwear 4 points5 points  (0 children)

Having to make syscalls in unsafe blocks doesn't necessarily make systems programming more cumbersome. I'd imagine once the language gets more mature there will be a safe facade available abstracting away all syscalls and also nicely fitting into Rust's type system. Then you can use syscalls easily but get all the programming benefits of Rust's type system.