8 ms·
If they would have used a modern, safe programming language like rust those errors would be impossible to... oh wait... Never mind.
by samdoesnothing 1y ago
If they would have used a modern, safe programming language like rust those errors would be impossible to... oh wait...
Never mind.
- arp242 1y agoNo one has ever claimed Rust prevents all bugs. This is such a tired strawman trope.
- tssva 1y ago"No one has ever" regarding human actions is quite a bold claim to make in relation to anything.
- spacechild1 1y agoThere a people who claim that "once it compiles, it works". I've seen this quite a few times here on HN. Just a random example: https://news.ycombinator.com/item?id=45046182 https://news.ycombinator.com/item?id=45046182
- acdha 1y agoThat’s a far more nuanced comment than you’re portraying it as, especially as it’s appearing for exactly this scenario: the new dd is working as designed, it’s not segfaulting or corrupting data, but its design isn’t identical to the GNU version and that logic error is the kind of thing Rust can’t prevent short of AGI.
- arp242 1y ago> "once it compiles, it works" That is not a quote from that post. I am very much not pedantic about only using quotation marks for quotes as long as it reasonably accurately gets the gist right, but in this case it very much doesn't. You are leaving out the qualified language of "generally", which completely changes what was said. And worse, the post explicitly acknowledges that it doesn't solve all bugs in the next sentence. And even if you can dig deep and find someone using unqualified language somewhere, I'm willing to bet a lot of money that this is an oversight and when pressed they will immediately admit so (on account of this being an internet forum and not a scientific paper, and people are careless sometimes). "I like coffee" rarely means "I always like coffee, all the time, without exception".
- spacechild1 1y agoFair enough.
- samdoesnothing 1y agoOh come on, tons of rust evangelicals claim that if it compiles, it works.
- acdha 1y agoConsider that “works without crashing” and “works the way I had in mind” are not the same thing. Rust makes it easier to avoid logic bugs but if you think bs= should do X and there should have been a spec saying to do Y, it’s not something a language can prevent.
- arp242 1y agoWho? When? Writing bugs in Rust is trivial and happens all the time. "do_stuff(sysv[1], sysv[2])" is a bug if you reversed the sysv arguments by accident. You can easily create a more complex version of that with a few "if" conditionals and interaction with other flags. There are many such silly things people can – and do – trivially get wrong all the time. Most bugs I've written are of the "I'm a bloody idiot"-type. The only way to have a fool-proof compiler is to know intent. What people may say is something like "if it compiles, then it runs", which is generally true, but doesn't mean it does the right thing (i.e. is free of bugs).