3 ms·
Hmmm, interesting. The "defer" approach is a different spin on things. But yes, panic/recover does look like it would address my concerns. I never did like exce
by charlieflowers 14y ago
Hmmm, interesting. The "defer" approach is a different spin on things. But yes, panic/recover does look like it would address my concerns. I never did like exceptions across package boundaries much, but inside a cohesive module I want to use them instead of a bunch of code that checks return values for error codes.
- charlieflowers 14y agoAlthough, another post above says it's not idiomatic, so I guess working with go means accepting the lack of an exception mechanism.
- pkulak 14y agoNo, jlgreco had it exactly right.