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:

    Every morning I woke in dread, waiting for the day nurse to go on her rounds and announce from the list of names in her hand whether or not I was for shock treatment, the new and fashionable means of quieting people and of making them realize that orders are to be obeyed and floors are to be polished without anyone protesting and faces are to be made to be fixed into smiles and weeping is a crime.
    Janet Frame (b. 1924)

    Do your children view themselves as successes or failures? Are they being encouraged to be inquisitive or passive? Are they afraid to challenge authority and to question assumptions? Do they feel comfortable adapting to change? Are they easily discouraged if they cannot arrive at a solution to a problem? The answers to those questions will give you a better appraisal of their education than any list of courses, grades, or test scores.
    Lawrence Kutner (20th century)

    I am always sorry when any language is lost, because languages are the pedigree of nations.
    Samuel Johnson (1709–1784)