There is value in having more confidence that your program is memory-safe, if you are concerned about attackers. (But I also think we should just redesign our operating systems so we are less worried about attackers).
-
-
Replying to @Jonathan_Blow @obiwanus
I think you're underestimating the influence of memory safety. In particular, more than avoiding vulnerabilities, it's avoiding aliasing: every bit has a clear owner. The compiler forces you to do that. And that is incredibly helpful. Lemme try to explain what I meanx
1 reply 0 retweets 0 likes -
Think of a multithreaded system. How do you cooperate between threads? How do you share memory? That is not easy, and more often than not you end up pulling the rug from under some other thread's feet.
1 reply 0 retweets 0 likes -
Rust forces you to not do that: only one thread can examine memory that's being modified at one particular time. This is their restriction on aliasing.
2 replies 0 retweets 0 likes -
But how is this useful outside of a multithreaded scope? Well... Think of a library that you're building. Maybe a simulation, given your background on videogames. The more distant two pieces of code are, the least conscious you are of the influence one has over the other.
1 reply 0 retweets 0 likes -
This is just like how two threads are very difficult to understand together. Will you modify _this struct_ somewhere in the simulation, far from this section of code? Who knows. Well, by limiting aliasing you can actually prove that you won't. That's one way Rust prevents bugs :)
1 reply 0 retweets 0 likes -
Replying to @FelixFischer91 @obiwanus
This would be fine if the kind of problem you are describing was responsible for a significant percentage of our bug load. But it isn't.
2 replies 0 retweets 0 likes -
In general this kind of rhetoric you are giving me, I feel, is driven by theoretical ideas, rather than a data-driven approach to how do we minimize software bugs. Which is fine, but then I wish Rust people would admit that, rather than claiming they are addressing correctness.
1 reply 0 retweets 1 like -
Replying to @Jonathan_Blow @obiwanus
Hmm. But how do you minimize bugs? Have you seen the stdlib? There are data structures there that you don't ever see in C++ because they're so hard to debug.
2 replies 0 retweets 0 likes -
Replying to @FelixFischer91 @obiwanus
None of this is data driven. If the priority is to minimize bugs, you have to: (1) Take some set of projects in the domain you care about (2) Look at what the bugs were, and how much time it took to address them (3) Classify those bugs into various categories in terms of how
3 replies 2 retweets 4 likes
they might be approached (4) Rank each category by priority (5) Propose methods for dealing with each category (6) Accurately assess the degree to which each method will really alleviate each bug type (7) Accurately assess the increased costs due to adopting these methods, and
-
-
correctly consider whether those costs outweigh the proposed benefit (8) Formulate some metrics that let you measure (6) and (7) in reality, and compare to your pre-estimates (9) Use 5-8 on some new set of complex projects, seeing how they worked over those projects' lifetimes.
1 reply 1 retweet 4 likes -
(10) goto 1
0 replies 1 retweet 4 likes
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.