4 ms·
If you don't want to return anything you'd declare your function return type as void, so that's probably more in dynamically typed systems.
by slver 5y ago
If you don't want to return anything you'd declare your function return type as void, so that's probably more in dynamically typed systems.
- magicalhippo 5y agoWe've had cases at work where the issue is that a void function (procedure) is converted to a "proper" function, and some return paths are missed. For our compiler, for certain types it fails to warn that the return variable is unassigned, hence bugs occur. This is a statically typed language, it's just an unfortunate interaction between compiler magic and the code that checks for unassigned return variables.