Jump to content

Talk:Closure (computer programming)/to do

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ruud Koot (talk | contribs) at 00:31, 25 August 2012. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
  • Introduction
    • Rewrite lead paragraph
      • Closure = Function + Environment
      • What happens when creating a closure? (Closure captures the current lexical environment)
      • What happens when entering a closure? (Function is executed in the lexical environemnt captured by the closure)
      • Picture?
    • Add an introductory section
      • Targeted primarily at imperative programmers who have little experience with non-local variables
  • History
  • Semantics
    • Closure (computer programming)#Differences in semantics: Scheme (variables in scope) vs. Smalltalk (variables + return + self) vs, Java 7/8/... (variables + return + this + exceptions + ...)
    • Capturing loop variables
    • Capture by reference vs. capture by copy, extending the lifetime and garbage collection (compare C++)
  • Implementation
  • Applications: thunk (delayed computation), memoization, object system, hidden state/static variables