Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: Functional Programming & method rewriting

by revdiablo (Prior)
on Oct 29, 2004 at 19:07 UTC ( [id://403874]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Functional Programming & method rewriting
in thread Functional Programming & method rewriting

That's true, but if you used that as the definition of "closure", then every subroutine that is in a lexical environment is a closure. That makes the term practically useless.

I think it's more useful to consider a closure to be a subroutine that closes around its lexical environment, and uses it to maintain state between invocations. It may not be as technically accurate, but it captures the meaning I think is most common, and definitely more useful.

  • Comment on Re^4: Functional Programming & method rewriting

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://403874]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found