Comment on How One Uncaught Rust Exception Took Out Cloudflare
cygnus@lemmy.ca 22 hours agoI feel like I’ve seen an insane number of error messages in various apps and websites around the unwrap method.
I suspect this is related to LLM usage somehow. We’ll probably see a lot more of this type of problem (sudden flareups of a particular bad code implementation)
ragingHungryPanda@lemmy.zip 21 hours ago
I actually disagree, because I’ve both seen it everywhere and I also work mainly in dotnet, and when I’ve talked to people about option and result types, the first inclination is to have a
.Value, but that defeats the purpose. I’ve done quite a few code reviews where I was essentially saying “you know this will throw, right? Use .Match or .Map instead”.I think the imperative programming backgrounds encourage this line of thinking, since one of the first questions I’ve gotten is “how do I get the value out of an Option? I’m 100% sure it’s there.” And often, surprise, it wasn’t.
cygnus@lemmy.ca 20 hours ago
Could be, but Rust has been around long enough that we’d see this already, no?
ragingHungryPanda@lemmy.zip 19 hours ago
Agreed, that’s what I was trying to say but I’m not great at writing. I’ve seen this in rust and other languages long before llms