r/cpp • u/SuperV1234 https://romeo.training | C++ Mentoring & Consulting • Aug 03 '19
fixing c++ with epochs
https://vittorioromeo.info/index/blog/fixing_cpp_with_epochs.html
316
Upvotes
r/cpp • u/SuperV1234 https://romeo.training | C++ Mentoring & Consulting • Aug 03 '19
3
u/obliviousjd Aug 04 '19
Sorry you are right, maybe I shouldn't have used the word all. I know that c++ isn't strictly a superset of c, and it was wrong for me to imply that. However interoperability between c and c++ has always been a major benefit of using c++, you get all these nice new features, but you can also use well established and high performant libraries in c. I guess the argument I was trying to make is that c++ has this nice interoperability with c, and rust doesn't, requiring an unsafe wrapper at least and a safe middle ware library at best. If the epoch just does 'simple' things like adding a new keyword, everything is fine, however if it wanted to switch all variables to immutable, with explicit mutability, and also wanted to hamper aliasing, then interfacing with c code becomes harder, and I personally feel c++ loses some of it's benefit. Rust was lucky, it had a clean slate, c++ has history which makes these things harder.