4 ms·
> There is no simpler language inside Rust that has the same safety guarantees, unless you strip out other useful features (traits, async, etc.). This sounds l
by pansa2 6y ago
> There is no simpler language inside Rust that has the same safety guarantees, unless you strip out other useful features (traits, async, etc.).
This sounds like “there is no simpler language inside C++, unless you strip out useful features (classes, templates, etc.)”. Yet C exists.
So there could be a simpler language with Rust’s safety guarantees if you were willing to strip out traits, async etc?
- deleted 6y ago[deleted]
- ivanbakel 6y ago>So there could be a simpler language with Rust’s safety guarantees if you were willing to strip out traits, async etc? Well yes, there exists a hypothetical C + borrow-checker language. But that language wouldn't really be significantly simpler, because the borrow-checker is the largest contributor to Rust's complexity. The only things you would have taken away are the more well-understood features, as they already occur in other languages. The C/C++ comparison doesn't really work, because there is (to my knowledge) no single C++ feature which makes up the majority of its complexity over C. You could strip out independent features of C++ one at a time to return to a simpler language. Rust doesn't have the same property.
- dgellow 6y ago> there is (to my knowledge) no single C++ feature which makes up the majority of its complexity over C Maybe template programming?