Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2018-06-24 12:13 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.