My today's CUFP won't have any code, just a huge Thanks to Perl for supporting closures.
Today I was dealing with some C code, this code was using dlopen to get some shared object and call some function to it. I couldn't change the API, but needed the called function of some specific plugin to behave differently according to some data I have only when getting the pointer to that function. I thought: well, a simple closure will solve the problem, but no... C doesn't support closures...
Fortunally, some guys at ##C at freenode helped me and pointed me to ffcal and I could find a way to solve my problem. But I'm still surprised by the fact this library is almost never used. Searching for reverse depends on the Debian archive, gnustep and gnustep libraries are the only packages to link against this library...
This made me think closure *is* a Cool Use For Perl...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Closures
by imp (Priest) on Jul 19, 2006 at 23:45 UTC | |
|
Re: Closures are Easy in Perl
by CountZero (Bishop) on Jul 20, 2006 at 11:58 UTC | |
by imp (Priest) on Jul 21, 2006 at 00:02 UTC |