This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Unnamed functions, functors or, more formally, functionliterals
Kris Warkentin <kewarken@qnx.com> writes:
> From: "Robert Dewar" <dewar@gnat.com>
>> Puzzlement ... in GNU C, you can perfectly well pass the address of a
>> local function. Now if you are saying you want full closures so that there
> No, I was thinking along the lines of java's anonymous inner classes or
> Python's lambda functions or even Perl's anonymous functions:
Perl's anonymous functions are full closures. Perl also has garbage
collection, which makes that possible.
Closures are pretty far afield from how C works.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>