Reputation
1,045
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
1 9 17
Impact
~31k people reached

  • 0 posts edited
  • 0 helpful flags
  • 179 votes cast
Jun
27
comment Named output parameters vs return values
Yes. But it often ends with MyFunctionReturnValueType, because you have a lot of different functions with different return types or different meanings of their return values.
Jun
27
comment Named output parameters vs return values
You also don't have parameters and variables called "x" and "y" unless they are coordinates. You have "blueThing", "someEventInformation", etc.
Jun
27
comment Named output parameters vs return values
In real code, functions are not called "f" and "g". They're called "createThingsList", "processThingsList", "adjustThingSize" or "isPlanetWhichCalledEarthFlat". You don't want co compose them.
Jun
27
revised Named output parameters vs return values
deleted 271 characters in body
Jun
27
comment Named output parameters vs return values
@AndresF., nope, that's not my question. my question is "should I use named output parameters instead of unnamed return values with comments with documentation on them"
Jun
27
comment Named output parameters vs return values
@Bobson. yep, we also have the void type for some reason. We also have function and procedure keywords in Pascal, proc in assemblers, and none of them in C++. guess why.
Jun
27
comment Named output parameters vs return values
@AndresF. it's just terminology. E.g. C++ has no "procedures", nor "methods" - only "functions".
Jun
27
comment Named output parameters vs return values
@unholysampler, what do you mean by "bad documentation" - wrong documentation, or lack of documentation, or what?
Jun
27
comment Named output parameters vs return values
"Make functions return values" - can you also explain why functions should return values? "the only time that modifying your inputs is acceptable" - again, why?
Jun
27
comment Named output parameters vs return values
Please suggest another names for handle_message and set_some_value functions, so it would be clear what they return.
Jun
27
revised Named output parameters vs return values
Reverted text removal. Added some more text.
Jun
27
asked Named output parameters vs return values
Mar
24
comment In C++ why and how are virtual functions slower?
-0x8(%rbp). oh my... that AT&T syntax.
Feb
20
awarded  Caucus
Nov
7
awarded  Yearling
Nov
7
answered Stored procedure Naming conventions?
Sep
27
comment Using T[1] instead of T for functions overloaded for T(&)[N]
@James it's just an old, ugly, unsafe, redundant C code.
Sep
26
revised Using T[1] instead of T for functions overloaded for T(&)[N]
added 216 characters in body
Sep
26
revised Using T[1] instead of T for functions overloaded for T(&)[N]
added 21 characters in body
Sep
26
asked Using T[1] instead of T for functions overloaded for T(&)[N]