3 ms·
It's as if people don't read the article before commenting, because the author mentions exactly this use case too: > Perhaps you’re doing prototyping and just
by cercatrova 4y ago
It's as if people don't read the article before commenting, because the author mentions exactly this use case too:
> Perhaps you’re doing prototyping and just need something that works most of the time, or you’re writing a simple app with limited error-handling needs. Some people use unwrap and expect for this situation, but I don’t. I use ? even in that situation, because I never know when prototype code might have to escalate to production code – either so suddenly there’s no time for me to intervene and improve the error handling or so gradually there’s no occasion for it and it never gets prioritized. Fixing crappy usage of ? in such a situation is way easier and more likely to happen than fixing a bunch of expects or unwraps.