9 ms·
Like goto, unwrap is just a tool that has its use cases. No need to make a boogeyman out of it.
by orphea 11mo ago
Like goto, unwrap is just a tool that has its use cases. No need to make a boogeyman out of it.
- gishh 11mo agoTo be fair, if you’re not “this tall” you really shouldn’t consider using goto in a c program. Most people aren’t that tall.
- tucnak 11mo agoNonsense. Linux kernel for one example, uses goto everywhere for error handling.
- fwjafwasd 11mo agopanicans should be using .expect() in production
- metaltyphoon 11mo agoYes it's meant to be used in test code. If you're sure it can't fail do then use .expect() that way it shows you made a choice and it wasn't just a dev oversight.