top | item 44597477

(no title)

rustcleaner | 7 months ago

Why did Mozilla reinvent the wheel with Rust when we had Ada/SPARK?

discuss

order

steveklabnik|7 months ago

Glibly, because they’re not the same language.

I don’t think I’ve ever heard Graydon comment on Ada specifically, but early Rust was very different than today’s Rust. Funny enough, I’d argue that early Rust was much closer to Ada than the Rust we ended up with.

One thing that makes Ada and current Rust different is that Ada does a lot more checks at runtime than rust does, and is more okay with features that have more of a runtime than Rust is.

Another is that Ada doesn’t guarantee memory safety at compile time, or at least, it did not at that time. I believe that with the new Spark features that are inspired by Rust that recently landed may bring parity here, but I haven’t had time to investigate those yet.

But really, they're just very different languages from each other. There's no reason they can't coexist.

Jtsummers|7 months ago

SPARK 2012 was what made SPARK viable for a broader audience. Earlier versions of SPARK were not really properly integrated into Ada (SPARK annotations were in comments). SPARK also restricts what is expressible to what is provable within SPARK (which expands over time), this has some important consequences for concurrency and parallelism (using the "concurrency is not parallelism" distinction). So it would have been hard for Graydon Hoare to use SPARK 2012 in 2006 when he started on Rust, and the limitations around concurrency in SPARK 2012 would have been a non-starter for the objectives of Rust as adopted by Mozilla.