This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Unnamed functions, functors or, more formally, function literals
- From: "Paul V. Andreev" <sd70030 at lanet dot lv>
- To: Paul Koning <pkoning at equallogic dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 15 Mar 2002 17:19:55 +0200 (WET)
- Subject: RE: Unnamed functions, functors or, more formally, function literals
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