3 ms·
Very nice text. As i am very sceptical to Rust i apreciate the comarison to a language i know better. I was not aware that there is no formal spec for rust. Isn
by Surac 1y ago
Very nice text. As i am very sceptical to Rust i apreciate the comarison to a language i know better. I was not aware that there is no formal spec for rust. Isn't that a problem if rustc makes changes?
- usamoi 1y agoIt depends on who you are. For implementers of third-party compilers, researchers of the Rust programming language, and programmers who write unsafe code, this is indeed a problem. It's bad. For the designers of Rust, "no formal specification" allows them to make changes as long as it is not breaking. It's good.
- Surac 1y agoMedical or Miltary often require the software stack/tooling to be certified following certain rules. I know most of this certifications are bogus, but how is that handled with Rust?
- detaro 1y agoFerrocene provides a certified compiler (based on a spec they've written documenting how it behaves) which is usable for many uses cases, but it obviously depends what exactly your specific domain needs.
- steveklabnik 1y agoA few things: 1. There is a spec now, Ferrocene donated theirs, and the project is currently integrating it 2. The team takes backwards compatibility seriously, and uses tests to help ensure the lack of breakage. This includes tests like “compile the code being used by Linux” and “compile most open source Rust projects” to show there’s no regressions.
- SabrinaJewson 1y agoFerrocene is a specification but it’s not a formal specification. [Minirust](https://github.com/minirust/minirust https://github.com/minirust/minirust) is the closest thing we have to a formal spec but it’s very much a work-in-progress.
- Ar-Curunir 1y agoIsn’t the Ada spec also not a formal spec?
- the_why_of_y 1y agoThe most popular language with a formal specification is Standard ML. I guess this is terminology confusion on behalf of Surac, who probably just wants a specification that is independent of the rustc implementation.
- steveklabnik 1y agoIt's a good enough spec to let rustc work with safety critical software, so while something like minirust is great, it's not necessary, just something that's nice to have.