Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Meta

Post History

37%
+1 −3
Meta Rules for function submissions

Function parameters should not be allowed to be used in place of a return value. Reasons: Terms like return value and function result are explicitly specified as a specific, formal language i...

posted 2y ago by Lundin‭

Answer
#1: Initial revision by user avatar Lundin‭ · 2022-06-17T11:04:00Z (over 2 years ago)
**Function parameters should _not_ be allowed to be used in place of a return value.**

Reasons:
- Terms like _return value_ and _function result_ are explicitly specified as a specific, formal language item in most languages. 

  Therefore, interpreting a challenge asking for a return value as "return through parameter" is creating a local code golf dialect of the language (as was done on Stack Exchange). 

  New users of the site should not need to study local, site-specific dialects of programming languages in order to contribute. It's bad enough to allow non-standard extensions.
- Not all languages support pass by reference.
- Some languages separate subroutines (do not return a value) from functions (returns a value).
- Assuming that things like memory allocation are handled by the caller might give contributions an unfair advantage.