On Fri Jan 13 16:11:24 2012, David Bruant wrote: > Hi, > > I recently dove into Rust to understand what it was, and what it was for. > I am under the impression that the Rust syntax is now quite stable > (stable enough to write a Rust compiler in Rust). > > If it's the case, what about a C-to-Rust or C++-to-Rust compiler? > It would enable to leverage some existing code. > The Rust All Hands Winter 2011 presentation [1] say that some > components are planned to be written (slide 39). Such components > (parallel aspect aside) already exist in Gecko in C++. Having a > (partial) automation of the C++ to Rust transition would probably be > beneficial. > > Of course, very much like projects like Emscripten > (C/C++-to-JavaScript compiler), there is a need to rework the > generated code, but at least a good share of the transition is already > done. > It could also be an occasion to see how the Rust compiler perform with > generated code, with code written with other style than the current > contributors, etc. > > David > > [1] http://www.slideshare.net/pcwalton/rust-all-hands-winter-2011
I am extremely wary of source-to-source translators, as in my experience, they tend to generate code that is unreadable, unreadable error messages, and itself produces silent errors. On the other hand, writing, say, a concurrent HTML5 parser might be a nice way to demonstrate the power of Rust. Cheers, David -- David Rajchenbach-Teller, PhD Performance Team, Mozilla _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
