2 ms·
Functions return a value. Subroutines don't. Is that a pointless distinction? Why?
by lproven 4y ago
Functions return a value.
Subroutines don't.
Is that a pointless distinction? Why?
- CydeWeys 4y agoIt is. The way the two are defined/called us different, making refactoring a nightmare if you ever have a subroutine that later needs to be converted to a function to return a value. There's a reason other languages don't make this distinction. In every other language I'm aware of, it's all functions, and some return values and some don't, and refactoring between the two is easy.