Funarg Problem

Funarg is an abbreviation for "functional argument"; in computer science, the funarg problem relates to the difficulty of implementing functions as first-class citizen objects in stack-based programming language implementations. There are two subtly different versions of the funarg problem:
  • The upwards funarg problem is the problem of passing a function as a value returned "upwards" from a function call
  • The downwards funarg problem is the problem of passing a function value as a parameter "down" into another function call
In both of these cases, the problem relates to correctly passing the function's environment together with the function's code. Historically, the upwards funarg problem has proven to be the more difficult. For example, the Pascal programming language allows functions to be passed as arguments but not returned as results; thus implementations of Pascal are required to address the downwards funarg problem but not the upwards one. The C programming language avoids the main difficulty of the funarg problem by not allowing functions to be nested; because the environment of every function is the same, containing just the statically-allocated global variables and functions, a pointer to a function's code describes the function completely. In modern functional languages, functions are first-class values and can be passed anywhere. Thus, implementations of Scheme or SML must address both the upwards and downwards funarg problems. This is usually accomplished by representing function values as heap-allocated closures. Closure-based techniques have proven successful for imperative languages that allow function values as well. In fact, aside from some questions about performance, most language designers do not consider functional arguments a "problem" anymore.

See also

External link

 

<< PreviousWord BrowserNext >>
laboratory for laser energetics
bonito
rufous tailed jacamar
parral, chile
red bull theatre
david sarasohn
pamyat
earl wilbur sutherland jr.
cycling in ireland
george sutherland
hothouse flowers
stickman
sacramento bee
ekaterina svanidze
svein jinger
sveinbjorn sveinbjornsson
philippe de hauteclocque
list of artists by nationality
beinn alligin
list of irish artists
blind baking
vincent pallotti
tanzhe temple
spending review (united kingdom)
ogcbuying.solutions
smaky
coconut crab
vis (island)
centrobasket
vis (town)
khumjung
mark vermeulen
eberhard august wilhelm von zimmermann
stowiecino
air racing
te aroha
racal
ordnance
tadeusz borowski
gerhard richter
hugh sykes davies
new king james version
cinzia
zanzithophone