I got your point. I do agree that we (developers) should think exactly what the function will perform to assign the right return. Although, I also think it's a kind of extremism say that void isn't recommended at all! I came from a Java background, so there are principles I learned that justify the use of void functions like simple setters! Mostly if we don't get the right idea of some structure or practice, it lead us to a misconception of it!
Setters are also valid. I'd lump that with global config/state. The exceptions to the rule (there are no rules) π are minimal and the ability to misuse void are much higher in my experience. Thanks for adding to the discussion.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I got your point. I do agree that we (developers) should think exactly what the function will perform to assign the right return. Although, I also think it's a kind of extremism say that void isn't recommended at all! I came from a Java background, so there are principles I learned that justify the use of void functions like simple setters! Mostly if we don't get the right idea of some structure or practice, it lead us to a misconception of it!
Btw, well-elaborated article!
Setters are also valid. I'd lump that with global config/state. The exceptions to the rule (there are no rules) π are minimal and the ability to misuse void are much higher in my experience. Thanks for adding to the discussion.