4 ms·
> It then uses an exception-like model for error propagation to "solve" error handling (which is fairly easy to handle with a channel). If none of your code ev
by fixermark 8y ago
> It then uses an exception-like model for error propagation to "solve" error handling (which is fairly easy to handle with a channel).
If none of your code ever actually waits on the error channel when you spawn a goroutine, what happens?
Is there any circumstance where that behavior is preferable to guaranteeing something must wait on the error channel?
- arghwhat 8y agoGo's error paradigm is through return values that can be ignored, so an error channel would mimic "non-async" error handling in this case: Checking an error is is always up to the developer. The discussion about error paradigms (exceptions vs. globals vs. error values, forced checking vs. free choice, etc.) is quite a big one, and arguably an entirely different topic.