5 ms·
Philosophically, I think the view is that two independent implementations will give the language more long term stability by helping it avoid the trap of a sing
by karatinversion 5y ago
Philosophically, I think the view is that two independent implementations will give the language more long term stability by helping it avoid the trap of a single implementation, with its bugs, being the definitive version of the language.
On the practical level, rustc is written in rust and self-hosting, so reusing code from it in gcc would mean that you needed a rust compiler as well as a c compiler to compile gcc.
Also, rustc and gcc have incompatible licenses.
- raphlinus 5y agoI am not a licensing lawyer, but the license for rustc (and its standard library, and a great many infrastructural crates in the ecosystem) is dual MIT + Apache 2, which was explicitly chosen so that it would be compatible with both GPL v2 and GPL v3.
- estebank 5y agoI think that the biggest barrier to having GCC use the rustc frontend isn't technical, it's the requirement of copyright assignment to the FSF.
- pjmlp 5y agoThat wasn't a problem when GCC was a requirement to keep free beer UNIX alive, how quickly people forget.
- estebank 5y agoIt is a problem when trying to bring code from an existing codebase that has no such copyright assignment clauses. Bringing the rustc frontend code into gcc would be unlikely because getting a copyright release to GNU from everyone that contributed to rustc would be unlikely.
- nextaccountic 5y agoDo you know whether the GCC Ada, Fortran, Go, D and Java frontends also assign full copyright to the FSF? Are the copyright of all dependencies likewise assigned to them?
- Blikkentrekker 5y agoThere is no such requirement to develop one's own frontend for the GCC, but there sometimes is to be part of the GNU project.
- estebank 5y agoYou can always take GNU licensed code and build what you want as long as you comply with the license, but to be part of the GCC release that copyright assignment requirement exists.
- Blikkentrekker 5y ago> On the practical level, rustc is written in rust and self-hosting, so reusing code from it in gcc would mean that you needed a rust compiler as well as a c compiler to compile gcc. I see, they want a full Rust implementation written in C++ rather than in Rust?