Unnamed functions, functors or, more formally, function literals

Paul V. Andreev sd70030@lanet.lv
Fri Mar 15 07:20:00 GMT 2002


On Fri, 15 Mar 2002, Paul Koning wrote:

> Names also make code more readable.

Or, sometimes, less. It is better to have both alternatives so that
programmers know what a name is for and not just to define a function.


> Unnamed functions exist in one language I know of (Lisp).  Admittedly
> I don't have much experience in that language, but from modest
> exposure to Elisp I have the impression that they are very rarely
> used.

As far as I know, in addition to Lisp, Java, ActionScript, COBOL and many
scripting languages can do this.

Please see also what Paul Long say in his proposal to standardisation
comitee ftp://ftp.dmk.com/DMK/sc22wg14/c9x/misc/function-literals.txt.gz
His definition of function literals is slightly different from mine,
howewer.


Paul





More information about the Gcc mailing list