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:

    Love’s boat has been shattered against the life of everyday. You and I are quits, and it’s useless to draw up a list of mutual hurts, sorrows, and pains.
    Vladimir Mayakovsky (1893–1930)

    I made a list of things I have
    to remember and a list
    of things I want to forget,
    but I see they are the same list.
    Linda Pastan (b. 1932)

    People in places many of us never heard of, whose names we can’t pronounce or even spell, are speaking up for themselves. They speak in languages we once classified as “exotic” but whose mastery is now essential for our diplomats and businessmen. But what they say is very much the same the world over. They want a decent standard of living. They want human dignity and a voice in their own futures. They want their children to grow up strong and healthy and free.
    Hubert H. Humphrey (1911–1978)