On 12/4/13 7:36 PM, Kevin Cantu wrote:
There are a couple parts of the Rust compiler about which I've heard
people say "if I knew how that worked, I'd fix it so that we could do
..."  So I definitely thought of Rust when watching that.

The Rust compiler is not that bad. Niko and I, as well as several others I'm sure, know how basically all of it works, at least at a high level. I think it's true that in any large piece of software, it's never true that everyone knows precisely how all of it works. The biggest problem with the Rust compiler, I think, is much of it is written in an old Rust style, and modernizing its style would not take too long. (Unfortunately we're all racing to 1.0 and on the core team such modernization will have to take a back seat to the 1.0-incompatible language changes... but that said we should not allow our technical debt to garner too much interest.)

The particular criticisms of the Scala compiler, that the front-end does too much desugaring and that code is a string, are definitely not true for the Rust compiler. (Well, OK, `for` is desugared too early, but that has to be fixed before 1.0 anyway because this desugaring is actually incorrect.)

Niko and Jed, just to name two, have done a lot of work to improve the state of the Rust compiler, for example by rewriting type unification, rewriting ad-hoc passes to use the CFG produced by liveness analysis, introducing `Datum`, and creating a universal ADT type to represent data types. There is more work to be done, of course, and I think we should very much hold the line against additional cruft being added to the compiler at this point, but I think we're OK as long as we keep moving in the right direction.

Patrick

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to