3 ms·
I think if both languages were fully formalized Rust would have a smaller formalization. I don't know if Rust's grammar is context-free but it's much closer tha
by zetalyrae 5y ago
I think if both languages were fully formalized Rust would have a smaller formalization. I don't know if Rust's grammar is context-free but it's much closer than C++'s grammar.
- masklinn 5y agoThe grammar is not a big issue. The assertion it trivially true through how much C++ features interact with one an other, badly. Just understanding the generation of special methods depending on which you implement by hand is an 8x6 matrix, and that tells you nothing about how they misbehave when you fail to follow the “Rules of Whatever” (variously 0, 3, 5, 6) properly.
- steveklabnik 5y ago(Rust's grammar has one teeny tiny corner that's context sensitive, and so that makes the entire thing context sensitive in a formal sense, but in practice, it is much simpler than that in the vast, vast majority of cases.)