3 ms·
I agree that Rust differs needlessly from previously curly-brace languages. Rust could have achieved its core goals --- memory safety and robust concurrency ---
by quotemstr 5y ago
I agree that Rust differs needlessly from previously curly-brace languages. Rust could have achieved its core goals --- memory safety and robust concurrency --- as a dialect of C++ instead of as a whole new language with the latest fashion sense (cough Go *cough) thrown in.
It's also a shame that your comment is being downvoted into oblivion. I remember when HN was for discussion, not for karma-enforced orthodoxy.
- zozbot234 5y ago> could have achieved its core goals --- memory safety and robust concurrency --- as a dialect of C++ instead The C++ Standard committee disagree with you - and not for lack of trying, either. The C++ Core Guidelines are the best they could come up with, and these are not rigorously enforced unlike the safe subset of Rust.
- quotemstr 5y agoAre you talking about [1]? All that paper says is that you can't add a borrow checker to C++ as a library feature. You can add such a thing as a language feature. I hate that paper. People misrepresent it all the time. [1] https://docs.google.com/document/d/e/2PACX-1vSt2VB1zQAJ6JDMaIA9PlmEgBxz2K5Tx6w2JqJNeYCy0gU4aoubdTxlENSKNSrQ2TXqPWcuwtXe6PlO/pub https://docs.google.com/document/d/e/2PACX-1vSt2VB1zQAJ6JDMa...
- steveklabnik 5y agoThey are talking about https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
- quotemstr 5y agoWhat do you mean? The core guidelines weren't an attempt to add lifetimes to C++.
- steveklabnik 5y agoSeveral aspects of it pertain to lifetimes https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#SS-lifetime https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines...
- quotemstr 5y agoNevertheless, the core guideline were not an attempt to add lifetimes to C++ at a syntactic level. AFAIK, that's never been tried, and I think the effort would be a valuable complement to Rust.