|There's more than one way to do things|
RE: RE (tilly) 1: Fly Subroutines on the Flyby BlaisePascal (Monk)
|on Sep 19, 2000 at 06:30 UTC ( #33050=note: print w/replies, xml )||Need Help??|
"I am only an egg"
What do you mean by "Where closures rock is as a way to provide optional hooks when you compile a function without paying any run-time price if the hook was not included".
Could you provide an example of what you mean?
And why is eval being used here at all? Wouldn't the following be simpler, faster, and easier to maintain?
That's what I'd call a closure (well, the subroutines returned anyway, make_divide itself isn't one, but it's return values are).
So, as I so often ask, what am I missing?
In Section Seekers of Perl Wisdom