News for hackers. Stuff that matters.
Re:Writing a Linux-compatible kernel in Rust by johnisgood on Tuesday October 26, 2021 @06:56AM (#28998739)
> Rust with its safety guarantees has those benefits in a way no other language does.

Excuse me? Do you know about Ada/SPARK? Rust is super far from Ada in terms of safety. I see misconceptions about Ada here all the time. Well, either that, or they do not know much about the language. Seriously, if you are interested in safety, you must check Ada/SPARK out.

Re:Writing a Linux-compatible kernel in Rust by brabel on Tuesday October 26, 2021 @07:21AM (#28998941)
I think you're right, but there's very little chance Ada/SPARK will ever become as popular as Rust because of politics. Rust managed, somehow, to get the backing of tech giants like Microsoft and Amazon... the fact it started at Mozilla, a well-regarded company with lots of influence in tech (despite its downwards trajectory in the browser wars) probably means more than any technical advantage Rust has over the competition (though I have to say Rust's type system and the borrow-checker are really inovative on their own and deserve the general praise they receive).

If Ada/SPARK were to be successful, they would need this corporate backing. Maybe that's possible outside the USA? Say, the EU probably has enough influential tech companies and weight to push forward with a Rust competitor that's perhaps superior (as you claim, I don't know enough about SPARK yet to make that claim myself)? I think that would be extremely benefitial to both the tech world AND to Rust and Ada themselves... competition is a great way to make things evolve fast.

EDIT: Ada/SPARK does seem to have a really good advantage over Rust: it's an actual specification, not just a single compiler implementation where "whatever the compiler does" is how the language behaves. This is very important in many industries. I know there's work ongoing to fix this for Rust, but that may take several years and even never amount to anything.

Re:Writing a Linux-compatible kernel in Rust by thesuperbigfrog on Tuesday October 26, 2021 @08:47AM (#28999710)
Re:Writing a Linux-compatible kernel in Rust by asoneth on Tuesday October 26, 2021 @09:24AM (#29000084)
I am an outsider who has not personally written anything in Ada/SPARK or Rust.

But I have worked at companies that transitioned (or started to transition) from C/C++ to Ada/SPARK and from C/C++ to Rust. I suspect that there are a few additional factors besides politics that prevented some C developers from taking Ada/SPARK as seriously as they seem to be taking Rust.

1) Ada and SPARK still retain a whiff of academic/military design-by-committee which prejudices a certain kind of developer. Whereas the Rust team has been open-source from the start.

2) The military projects I am familiar with started switching to Ada (and later SPARK) due to the US DoD mandate in the 90s. Of the people I know who use it, many of them started using it because their job required it. (Though to be honest many of them now love it!) Whereas Rust adoption seems to be largely driven by a hearts-and-minds initiative to convince regular developers that memory safety is a problem in C, and that they should choose Rust to solve that problem.

3) Syntax. Some C developers don't seem to consider a language a Serious Programming Language unless it uses curly braces. (Just ask a C/C++ developer about Lisp's parentheses or Python's whitespace.) Whereas the Rust team decided to hew close to the conventions used in C wherever appropriate.

Re:Writing a Linux-compatible kernel in Rust by johnisgood on Tuesday October 26, 2021 @09:26AM (#29000107)
I have to say that I love curly braces, but given some Ada's features I can forgive the language for the lack of it. :) But yeah, those points are fair.
Re:Writing a Linux-compatible kernel in Rust by IAmLiterallyAB on Tuesday October 26, 2021 @10:02AM (#29000492)
Does Ada also have something similar to the borrow checker? That is, forbidding bad memory access at compile time. I'm not familiar with Ada
Re:Writing a Linux-compatible kernel in Rust by johnisgood on Tuesday October 26, 2021 @10:25AM (#29000791)
Re:Writing a Linux-compatible kernel in Rust by geon on Tuesday October 26, 2021 @08:30AM (#28999561)
Those are pretty obscure. Do you expect os developers to use them?