hi,
I am looking for further details and explanations about the various behaviors
associated with closed Vs nil channels.
I already read
and other publications such as
They repeat the explanation of the behaviors the programmer will have to deal with,
however they don't really explain the internal, nor the reasons of the differences
I wonder under which case it is useful to panic on write, Vs branching to a default case within a select.
Said differently what is the advantage of a panic Vs a syntax like ok := mychan <- myval; if !ok { return "not wrote" }
Yes, there are ways to handle the problem of uncertain number of senders, but there are no simple ways.
A mechanism must be designed to avoid any sender writing to a closed channel.
thanks for anyone able to provide some details.