This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Blocks in g++ ?
- To: egcs at egcs dot cygnus dot com
- Subject: Re: Blocks in g++ ?
- From: "Thomas Steffen" <for_replies_only at iname dot com>
- Date: 11 Jun 1999 15:06:57 +0200
- References: <199906111243.NAA13071@phal.cygnus.co.uk>
>>>>> "Joern" == Joern Rennecke <amylaar@cygnus.co.uk> writes:
>> yes, that's what i thought. afaik you can't pass nested
>> functions as parameters to unrelated calls (in a foreign
>> context), where you can pass closures.
oops. i ment you CAN pass, of course. so...
Joern> You can. What you can't do is store a pointer to a nested
Joern> function and use it after the function it was nested in has
Joern> returned.
indeed, i hadn't thought about that (neither about that use nor it's
infeasibility). it would be nice for GUI programming of course, so you
could write all those eventhandlers/callbacks very easily.
still, even if the closure is only available during the nested
function call, it would be useful for a lot of things...
"Thomas Steffen" <for_replies_only@iname.com>
--
linux, linuctis - f, das beste Betriebssystem ;-) [Tobi in doc]