Callable object

A callable object, in computer programming, is any object that can be called like a function.

In C++

 * pointer to function;
 * pointer to member function;
 * functor;
 * lambda expression.
 * is a template class that can hold any callable object that matches its signature.

In C++, any class that overloads the function call operator  may be called using function-call syntax.

In C#

 * delegate;
 * lambda expression.

In PHP
PHP 5.3+ has first-class functions that can be used e.g. as parameter to the  function:

It is also possible in PHP 5.3+ to make objects invokable by adding a magic  method to their class:

In Python
In Python any object with a  method can be called using function-call syntax.

Another example:

In Dart
Callable objects are defined in Dart using the  method.

In Swift
In Swift, callable objects are defined using.