minus-squarerealharo@lemm.eetoProgramming@programming.dev•It's probably time to stop recommending Clean Code @ Things Of Interestlinkfedilinkarrow-up0·edit-21 month agoWhy is it a void method? This only tells me that some state is mutated somewhere, but the effect is neither visible nor documented. I would expect a function called “calculate” to just return a number and not have any side effects. linkfedilink
Why is it a
void
method? This only tells me that some state is mutated somewhere, but the effect is neither visible nor documented.I would expect a function called “calculate” to just return a number and not have any side effects.