Jump to content

Talk:First-class function/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 02:30, 22 August 2012. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
  • Interaction between higher-order and nested functions. Supported in Algol and Pascal. (Andrew Appel. Modern compiler implementation)
  • Raphael A. Finkel. Advanced Programming Language Design
  • Michael Lee Scott. Programming Language Pragmatics
  • Functions as dynamic values in dynamic programming languages (eval)
  • C Sharp 2.0#Anonymous delegates vs. C Sharp 3.0#Lambda expressions
  • Lexical and dynamic scoping
  • Putting it together: function composition, a higher-order function taking two functions as argument and returns an (anonymous or nested) function.
    • Pascal: fails because we cannot return functions
    • Oberon: fails because we cannot return nested functions
    • C: fails because the function we return needs to have access to the (non-local) paramaters
    • Lisp: fails because of dynamic scoping
    • C++0x: fails because closures do not extend lifetime/capture by copy
    • Java: fails because anonymous inner classes cannot capture the non-final parameters
  • Early languages: POP-2
  • parameters/non-local variables/partial application
  • First-class functions and object-oriented languages (scoping of this, fully-featured closures?)
  • Discuss why C is sometimes said to have 1.5-class functions (e.g. in MLS, Prog. Lang. Prag.)
  • Tidy the table (again...); add ref=note
  • Figure out how Algol and Pascal compilers handle passing nested functions as arguments to higher-order function. They probably don't build a closure.
  • Missing from language support table: PL/M, PL/I, Modula 2, Modula 3
  • http://c2.com/cgi/wiki?FirstClass