3 ms·
What Rust brings to the table is static enforcement of its ownership rules, that's it. How does Rust deal with buffer overflows? Bounds checking. What an innov
by alexvitkov 3y ago
What Rust brings to the table is static enforcement of its ownership rules, that's it.
How does Rust deal with buffer overflows? Bounds checking. What an innovative solution, congratulations to the Rust people for this groundbreaking innovation. And they keep acting like they've fucking discovered hot water.
- lifthrasiir 3y agoRust is novel because it bundles lots of existing ideas into one usable package. Even the borrow checking is not new, it's adapted and improved from research languages like Cyclone.
- delfinom 3y agoYea but did anyone else market hot water first? I think not!
- insanitybit 3y agoNo one is saying that bounds checking is novel. It's really C and C++ that are novel, in that they are the only languages where bounds checking is not the default. But if you're having the "memory safe replacement for C/C++" conversation it shouldn't surprise you that people bring up Rust.
- danShumway 3y agoAgreed, the interesting part isn't that hot water exists, it's that given the widespread existence of hot water so many people still insist on exclusively showering with cold water. I'm not even saying that bounds checking should be used everywhere, just that it really does seem like unsafe shouldn't be the default for so many projects.
- jonas21 3y agoI'd say the analogy goes the other way around. Showering with cold water is obviously safer (no chance of accidentally scalding yourself). But most people prefer showering with hot water because it's the way they've always done it, they're more comfortable with it, and while they could get burned by it, they view the risk of significant damage to be relatively low (if you discover the water is too hot, fix it quickly and you'll probably be fine).
- pjmlp 3y agoTime to repost my favorite C.A.R Hoare quote from 1980, as C was gaining traction. "Many years later we asked our customers whether they wished us to provide an option to switch off these checks in the interests of efficiency on production runs. Unanimously, they urged us not to--they already knew how frequently subscript errors occur on production runs where failure to detect them could be disastrous. I note with fear and horror that even in 1980, language designers and users have not learned this lesson. In any respectable branch of engineering, failure to observe such elementary precautions would have long been against the law."