Question

Autobots

Are There Any Cons to Having a Return Statement In all Functions?

Asked by Autobots 2 months ago function return statement

Answers

Sadi
0
 
I don't think, there would any problems, as it seems a matter of returning just address of memory space, either it be an huge data object, small integer value or null (no address).

Now what matter most is how understandable your code is. Our hardware is now too efficient that these things are meaningless now). My personal practice is to return anything when its make sense to return rather than returning 1 at end of each of function definition. (as it was often seen in C/C++).

by Sadi 2 months ago

unregistered
0
 
I would think that it would be a bit slower!

by unregistered 2 months ago

Answer this question

Are There Any Cons to Having a Return Statement In all Functions?

0 errors found:

 
0