Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://669777]
help
Chatterbox?
and all is calm...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2017-09-23 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (273 votes). Check out past polls.

    Notices?