What criteria do we use to decide when to use void and when not to?
Why do some methods have return type while others do not?
It seems a bit unreasonable to explain the need for return type and when it is unnecessary simply by using void
I understand that using void without a return type can create side effects and make testing difficult. When is it absolutely necessary to use void?
I suspect that this may be related to the atomicity of command units such as reading and writing, or the isolation of shared resources. Has anyone thought deeply about this aspect?