Content deleted Content added
m →Practical implications: fmt., punct. |
Jim Grisham (talk | contribs) →top: Added parenthetical statement to indicate that ‘funarg’ relates to the argument ps |
||
Line 1:
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>[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>
|