Lambda

Reference 1

Lambda: Syntactically, lambda refers to a form for describing anonymous functions.

But a lambda does not become a function pointer.

It becomes a closure.

Closures are data structures with both a code and a data component.

Two strategies to compile lambdas into closures:

  • Flat closures
  • Linked (or shared) Closures

Closure Conversion: flat closure is top-down compilation; and linked(or shared) closure is bottom-up compilation.

  • Lambda Lifting
  • Reference [^wiki-lambda-lifting] 1982 by Thomas Johnsson. restructures a computer program so that functions are defined independently of each other in a global scope. two step process: eliminating free variables in the function by adding parameters; moving functions from a restricted scope to broader or global scope. Different with Closure Conversion [^wiki-lambda-lifting] Lambda Lifting

Created Nov 27, 2019 // Last Updated Nov 27, 2019

If you could revise
the fundmental principles of
computer system design
to improve security...

... what would you change?