3 ms·
How about the sheer cost of the rewrites? Probably hundreds of billions of dollars worth of rewriting and retesting, if not more. Plus the costs of retraining.
by wakawaka28 3y ago
How about the sheer cost of the rewrites? Probably hundreds of billions of dollars worth of rewriting and retesting, if not more. Plus the costs of retraining.
Memory safety is very weak in Rust, IMO. Memory errors are only one kind of error, and users of other languages have invented many brilliant ways to avoid and fix issues. It would be better to focus on detecting and preventing errors than rewriting IMO.
- _mlbt 3y agoThat's why I said new software. I understand that it is unrealistic to rewrite existing software in many cases.
- wakawaka28 3y agoIt's also unrealistic to expect existing software to go away. So "memory unsafe" languages aren't going anywhere. People who don't want to learn how to manage memory correctly have had good alternatives to C and C++ for decades, each with their own drawbacks. And C and C++ remain viable with active developer communities despite all the attacks over a span of decades crying about memory management being difficult.
- _mlbt 3y agoThe crux of the problem is not that memory management is difficult, it’s that with unsafe languages it is dangerously error prone. In the 70s and 80s most machines were considerably more resource constrained and either on closed networks or not networked at all. In today’s world where everything is connected to 24/7 high speed internet these are risks that just aren’t worth taking for most new software projects.
- wakawaka28 3y agoYou say it isn't difficult but it is "error-prone", which is a contradiction. Either it is hard to get right or it isn't. I think it might be but not to the extent you do. Whatever issues we have with memory management, solutions exist and have existed for decades. People who continue to use so-called "unsafe" languages tend to know what they're doing. There are lots of solutions out there besides rewriting in another language that isn't that much less error-prone, such as Rust.
- ModernMech 3y agoI think what the parent means to say is that memory management is simple to understand, but it’s hard to get right. Put differently, a developer can grok how to properly manage memory, but we’ve found that trying really hard to get it right does not scale. Even if you’re an expert. We need tools to check our work.
- steveklabnik 3y agoThese guidelines do not speak about re-writes, they talk about new code, techniques to mitigate memory unsafety in existing code, and preferring to use memory safe tools where possible, for example, when you are purchasing software.
- gojomo 3y agoSheer cost of "hundreds of billions"? Within another couple years, automated systems that are descendants of today's rapidly-advancing coding-assistant LLMs will be able to do amazing things. For example, it's plausible they'd be able to to create proven-memory-safe rewrites of older software, with verified drop-in compatibility for all enumerable use-cases, practically for free. Well, unless it's a parasitic government contractor doing the work.
- wakawaka28 3y ago>Within another couple years, automated systems that are descendants of today's rapidly-advancing coding-assistant LLMs will be able to do amazing things. Yeah I'll believe it when I see it. If humans struggle to figure out what these systems are supposed to do, no AI is going to figure it out. Hundreds of billions of dollars is a lowball estimate on what it would take to rewrite it all in Rust.
- xmcqdpt2 3y agoAnything is possible if you extrapolate wildly enough.