Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Funarg problem
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
In [[computer science]], the '''funarg problem''' ''(function argument problem)'' refers to the difficulty in implementing [[first-class function]]s ([[function (programming)|function]]s as [[first-class object]]s) in programming language implementations so as to use [[stack-based memory allocation]] of the functions. The difficulty only arises if the body of a [[nested function]] refers directly (i.e., not by argument passing) to identifiers defined in the environment in which the function is defined, but not in the environment of the function call.<ref>[https://web.archive.org/web/20170706125408/ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-199.pdf ''The function of FUNCTION in LISP or why the FUNARG problem should be called the environment problem''], by Joel Moses, MIT Project MAC memo AI-199, MAC-M-428, June 1970 (15 pp.).</ref> A standard resolution is either to forbid such references or to create [[closure (computer science)|closures]].<ref>[http://portal.acm.org/citation.cfm?id=1093420.1093422 ''A proposed solution to the FUNARG problem''], by Erik Sandewall, in: ACM SIGSAM Bulletin 17 (Jan. 1971), pp. 29β42.</ref> There are two subtly different versions of the funarg problem. The '''upwards funarg problem''' arises from returning (or otherwise transmitting "upwards") a function from a function call. The '''downwards funarg problem''' arises from passing a function as a parameter to another function call.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)