Hacker News new | ask | show | jobs
by wongarsu 1118 days ago
C++ survives having a GCC variant and a MSVC variant, not to mention whatever half-broken compiler you used to get for your microcontroller code.

I would argue the requirement is that each compiler is a stable project. But one language can have multiple compilers that aren't 100% compatible and implement slightly different subsets of the language (as long as there's a common subset libraries can choose to stick to)

1 comments

C++ has an ISO standard, for better or worse. That's a different beast. Rust is defined by the implementation. Any hope for interoperability between potential adverserially competing forks is just wishful thinking.
>> Rust is defined by the implementation.

Hopefully not for long:

https://github.com/ferrocene/specification

https://ferrous-systems.com/blog/the-ferrocene-language-spec...

Hopefully Ferrocene can lead to Rust itself being standardized.

To me, it seems inevitable that there will be multiple implementations of Rust, especially if Rust continues to be more widely adopted and used in new domains.

I would also not be surprised if Rust were to adopt optional language extensions for specialized use cases, similar to Ada's language annexes:

http://www.ada-auth.org/standards/22rm/html/RM-1-1-2.html

Why? Because the Rust implementation you use for video game programming does not need all of the same features as the Rust implementation that you use for safety-critical embedded systems (for example: railroad control software).

I'm involved in the Ferrocene project (1), so I'd like to clarify some things about the Ferrocene Language Specification. It is deliberately called Ferrocene Language Specification and not Rust Language Specification. The specification serves first and foremost the needs of the Ferrocene project - we just need a spec to certify the compiler. It may be useful to others, that's why we open sourced it.

It is not a specification that standardizes rust or prescribes any behavior to the compiler. It's a specification that describes certain aspects of the behavior of the existing rust compiler. It's neither comprehensive nor is intended to be. It follows the changes in the compiler. If there's a mismatch between compiler behavior or the spec, the spec is considered faulty. It is also not sufficient to write a new compiler based on the spec.

As such, Ferrocene is not an effort to standardize rust. We consider the Ferrocene project a certified downstream of the rust project. Any push to standardize rust would need to come from the rust project itself. We have not intention to create any such standard.

That said, there is some interest in building a specification for the rust language in the project itself - here's the relevant RFC https://github.com/rust-lang/rfcs/pull/3355

(1) I am one of the managing directors of Ferrous

Thank you for your work on Ferrocene, clarifications, and the link to the Rust RFC.