4 ms·
What is the difference between a function and a procedure to you? I assume it's not just about whether something returns a value or not. The only language I us
by newaccount74 5y ago
What is the difference between a function and a procedure to you? I assume it's not just about whether something returns a value or not.
The only language I use that differentiates between functions and procedures is PostgreSQL, and to be honest I find the distinction pretty annoying in practice. One can return values, the other can control transactions. So when refactoring code you sometimes need to make a function a procedure or vice versa and it's a pain. (As a consequence, I try to always use functions to make things easier)
- __vim__ 5y agoFortran distinguishes between the two as well.