3 ms·
Does this mean using C inside of rust is ok? I'm pretty sure the original team kept hitting memory problems and it was in fact not ok. Browsers crash often enou
by ArrayBoundCheck 4y ago
Does this mean using C inside of rust is ok? I'm pretty sure the original team kept hitting memory problems and it was in fact not ok. Browsers crash often enough that I don't want unwrap making it worse
- TheDong 4y ago> Does this mean using C inside of rust is ok? I'm pretty sure the original team kept hitting memory problems and it was in fact not ok This reads a little like flamebait. Memory unsafety is bad. panic is _not_ a memory unsafe operation, it does not result in memory problems. This post is not related to memory safety in any way.
- ArrayBoundCheck 4y agoThe third sentence was the point. I don't want browsers being less reliable and terminating randomly due to unwraps
- burntsushi 4y agoAnd how do you propose they do that? What you're saying is tautological. It's like saying, "I don't want browsers to use runtime invariants because they can be broken and thus causing my browser to terminate." Like... yeah, cool. How do you do that exactly? Also, please do consider reading the blog post I wrote. I wrote it to try to clarify a lot of confusing around this topic. It is nuanced, and it just can't be untangled in a few sentences in a HN comment.
- 0x457 4y agoI think you missed the point of the article. In fact, the article specifically covers catching panics, so it doesn't bring down the entire application. As well as covering when panic is okay. It doesn't say you should just unwrap everything and treat panic as error handling.
- ArrayBoundCheck 4y ago> the article specifically covers catching panics I see 3 mentions of catch, all in the same paragraph. It says you can catch it, offers no reasons why you want to then provides an example of output when you don't That doesn't sound like it "specifically covers catching panics"