in reply to Re^4: How do I go from procedural to object oriented programming?
in thread How do I go from procedural to object oriented programming?
Regarding the SQL extensions, well, the distinction between functions and procedures is not so clear. The main difference seems to be as in the Pascal case: if there is a return value or not. But then, function calls are allowed embedded inside SQL statements and that opens the door to lots of other considerations, more related to database implementation and internal matters than to anything else.
I think it's actually a little unlucky that C books speak about "void functions" rather than "procedures".
Just returning a value doesn't make a function a function in the functional programming sense (deterministic, no side effects). In C (at least) that is exacerbated by the fact that return values are commonly used to report errors.
So, it's true that C functions returning void are procedures, but then, most C functions returning values are also procedures. The distinction doesn't lie there.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: How do I go from procedural to object oriented programming?
by Jenda (Abbot) on Apr 21, 2015 at 13:25 UTC | |
by salva (Canon) on Apr 21, 2015 at 14:19 UTC | |
by Jenda (Abbot) on Apr 21, 2015 at 14:43 UTC | |
by einhverfr (Friar) on Apr 21, 2015 at 15:10 UTC | |
by salva (Canon) on Apr 21, 2015 at 15:40 UTC |