Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: (On Speed Diff, etc.) Closure on Closures (beta)

by yosefm (Friar)
on Jun 26, 2003 at 08:48 UTC ( #269154=note: print w/ replies, xml ) Need Help??


in reply to Re: (On Speed Diff, etc.) Closure on Closures (beta)
in thread Closure on Closures

I've seen objects actually implemented with a closure (like in this tutorial), as a way to give your objects a 'private/public' distinction. I wonder what would that do to performance...


Comment on Re: Re: (On Speed Diff, etc.) Closure on Closures (beta)
Re: Re: Re: (On Speed Diff, etc.) Closure on Closures (beta)
by chunlou (Curate) on Jun 26, 2003 at 09:52 UTC
    Right, that's a very clever use of closure. Maybe I didn't read enough, but I don't see such technique being used too often. It's good for avoiding more deliberate tempering with variables in a package. Isn't the usual lexical scope good enough to avoid accidental clashes between things?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2014-11-28 18:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (199 votes), past polls