Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Real life uses for closures.(Reply to all respondees!)

by BrowserUk (Pope)
on Feb 12, 2013 at 17:24 UTC ( #1018417=note: print w/replies, xml ) Need Help??


in reply to Real life uses for closures.

Many thanks to all respondees for making me think hard.

There is a lot of guff written on the web about the importance of closures; mostly supported by a) largely opaque, academic arguments; b) partiality for particular languages that (first) support(ed) them; c) trivial textbook examples where their use can often be replaced by less esoteric language constructs.

Real life examples of why they are useful are hard to find.

  • Comment on Re: Real life uses for closures.(Reply to all respondees!)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018417]
help
Chatterbox?
[LanX]: oh you want the result line by line?
[jdporter]: ok, LanX, then what?
[jdporter]: It doesn't have to be line by line. Just "my program" "writes" to the external prog and also/then "reads" from it.
LanX open (You are not allowed to open to a command that pipes both in and out, but see IPC::Open2, IPC::Open3, and Bidirectional Communication with Another Process in perlipc for alternatives.)
[jdporter]: IPC::Open2, I guess
[jdporter]: yes, that
[pryrt]: 1nickt: academically, perl -MDevel::Peek -lE 'Dump(42); Dump(42.0)'

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (12)
As of 2017-05-24 20:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?