Anonymous Function - List of Languages

List of Languages

The following is a list of programming languages that fully support unnamed anonymous functions; support some variant of anonymous functions; and have no support for anonymous functions.

This table shows some general trends. First, the languages that do not support anonymous functions—C, Pascal, Object Pascal, Java—are all conventional statically typed languages. This does not, however, mean that statically typed languages are incapable of supporting anonymous functions. For example, the ML languages are statically typed and fundamentally include anonymous functions, and Delphi, a dialect of Object Pascal, has been extended to support anonymous functions. Second, the languages that treat functions as first-class functions—Dylan, JavaScript, Lisp, Scheme, ML, Haskell, Python, Ruby, Perl—generally have anonymous function support so that functions can be defined and passed around as easily as other data types. However, the new C++11 standard adds them to C++, even though this is a conventional, statically typed language.

This list is incomplete; you can help by expanding it.
Language Support Notes
ActionScript Y
Ada N
C N Support is provided in clang and along with the llvm compiler-rt lib. GCC support is given for a macro implementation which enables the possibility of usage. Details see below.
C# Y
C++ Y As of the C++11 standard
Clojure Y
Curl Y
D Y
Dart Y
Dylan Y
Erlang Y
F# Y
Frink Y
Go Y
Groovy Y
Haskell Y
Java N Planned for Java 8
JavaScript Y
Lisp Y
Logtalk Y
Lua Y
Mathematica Y
Maple Y
Matlab Y
Maxima Y
ML languages
(OCaml, Standard ML, etc.)
Y
Octave Y
Object Pascal Y Delphi, a dialect of Object Pascal, implements support for anonymous functions (formally, anonymous methods) natively since Delphi 2009. The Oxygene Object Pascal dialect also supports them.
Objective-C (Mac OS X 10.6+) Y called blocks; in addition to Objective-C, blocks can also be used on C and C++ when programming on Apple's platform
Pascal N
Perl Y
PHP Y As of PHP 5.3.0, true anonymous functions are supported; previously only partial anonymous functions were supported, which worked much like C#'s implementation.
Python Y Python supports anonymous functions through the lambda syntax, in which you can only use expressions (and not statements).
R Y
Racket Y
Ruby Y Ruby's anonymous functions, inherited from Smalltalk, are called blocks.
Scala Y
Scheme Y
Smalltalk Y Smalltalk's anonymous functions are called blocks.
TypeScript Y
Tcl Y
Vala Y
Visual Basic .NET v9 Y
Visual Prolog v 7.2 Y

Read more about this topic:  Anonymous Function

Famous quotes containing the words list of, list and/or languages:

    Thirty—the promise of a decade of loneliness, a thinning list of single men to know, a thinning brief-case of enthusiasm, thinning hair.
    F. Scott Fitzgerald (1896–1940)

    We saw the machinery where murderers are now executed. Seven have been executed. The plan is better than the old one. It is quietly done. Only a few, at the most about thirty or forty, can witness [an execution]. It excites nobody outside of the list permitted to attend. I think the time for capital punishment has passed. I would abolish it. But while it lasts this is the best mode.
    Rutherford Birchard Hayes (1822–1893)

    The trouble with foreign languages is, you have to think before your speak.
    Swedish proverb, trans. by Verne Moberg.