Hacker News new | ask | show | jobs
by phkahler 2273 days ago
We can hope that the language itself is similarly declared "done" at some point. That would be in contrast to C++ for example, where it's the job of a bunch of people to keep making changes ad nausium until it starts to crumble.
1 comments

Would a Rust spec that actually allows multiple compatible implementations actually be simpler than the C++ spec? There has only ever been one real Rust implementation, and a lot of Rust behaviors are just arbitrary implementation decisions, especially with subtyping in the type system and the borrow checker.
mrustc has implemented a significant portion of the language, without a formal spec. It's at least advanced enough to compile the compiler. The biggest feature missing is borrowcheck.
I don't mean a formal spec. Rust is much too complicated and asymmetric to have a formal spec of the kind that exists for other languages (e.g. Standard ML), at least using current specification methodology. It doesn't even have an informal spec, which would be required to have a real attempt at multiple compatible implementations.
I hear what you're saying, but at the same time, mrustc is almost a counterexample of that. And we have real counterexamples in other languages too; Ruby and Python, for example.

(My understanding of mrustc and borrowck is that it's not implemented because the primary initial goal is bootstrapping rustc, not being a general rust compiler.)

Those are both core features of Rust, though, so any alternative implementation all but has to have them as that is the first thing anyone using it will be looking for.
Of course you need to have them, but there's no specification of their behavior, so your only hope at compatibility is reverse-engineering the existing implementation (or just reading its code).