3 ms·
yep, i agree. most pro rust arguments are from a safety perspective or that rust does a lot for you. the problem is that in a lot of applications nobody cares
by b20000 3y ago
yep, i agree. most pro rust arguments are from a safety perspective or that rust does a lot for you.
the problem is that in a lot of applications nobody cares about safety or security. it is just that devs operate in evironments where that matters and they think therefore it matters everywhere all the time.
when a language does something for you you then typically don’t learn what it actually does under the hood which will come back to bite you later. i have some of that problem with the latest C++ features as well, btw, which is why my C++ tends to look like C with classes and here and there use of a modern feature.
- hyperman1 3y agoI disagree. There was an article somewhere about servo, mentioning advantages of rust vs C++ . One example was how less intermediate copies were made, as rust made it clear what data was immutable. Another was how rust made threading more easy, as it was more clear what data needed locks. Rust safety on the small scale is an enabler for stability in the large scale, giving the possibility to take more risky optimizations. This is exactly where C and C++ fall flat. You can write small scale stable software with them, but multy decade multi team 1000k+ lines of software turns in a CVE fest. A lot more effort in documenting interface details and validation need to be done,because the compiler can't do it for you
- lionkor 3y agoImplicit copy in C++ is a horrible thing, but very consistent. You learn once that anything that doesnt fit in a register should be passed by (const) reference, and always delete your copy ctors by default, and that does a lot for you.