Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Mmmm, closures, they're almost as nice as bacon

by vrk (Chaplain)
on Feb 23, 2008 at 22:11 UTC ( #669777=note: print w/replies, xml ) Need Help??

in reply to Mmmm, closures, they're almost as nice as bacon

At work, I have to program in Java. (Since I'm a Perl programmer at heart, this is obviously not a stable job.) If I scratched a mark on my desk every time I encountered a situation where a closure were the simplest way to implement something and I could not use it (since Java doesn't have the concept), there would be only splinters left. You can simulate closures in some cases by using anonymous inner classes and instantiating anonymous classes from (possibly private) static interfaces, but it looks horrible and you only get half of the benefit.

Closures are incredibly powerful. Now if we only had call-with-current-continuation in Perl, we could save not only the calling context but the call stack as well...

print "Just Another Perl Adept\n";

  • Comment on Re: Mmmm, closures, they're almost as nice as bacon

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://669777]
[karlgoethebier]: ... a happy Sunday Roast...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2018-01-21 09:54 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (227 votes). Check out past polls.