Spyke

Replies

Comment on

How One Uncaught Rust Exception Took Out Cloudflare

I feel like I've seen an insane number of error messages in various apps and websites around the unwrap method.

But this is on a result type, right? I'd figure the point would be that you would match on it and that the unwrap itself, which if my assumptions are correct, is more like get value or throw, should either not exist or take a default value. You shouldn't be able to directly get the value of a monad.

Comment on

How One Uncaught Rust Exception Took Out Cloudflare

Reply in thread

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.

Comment on

*Permanently Deleted*

If the CIA wanted to put a keylogger on your phone, it would be customs, the CIA would intercept it at some point, possibly in customs, then put it in the boot loader or on the SSD firmware or something so you'd never know it was there and wouldn't reasonably be able to overwrite it no matter what.

That probably doesn't help you though. If you want to be sure you'd have to reflash every bit of the phone, not just the OS.