in reply to Re: Nailing down closures!
in thread Nailing down closures!

Closues are sometimes called "inside out objects."
By whom? I know 'inside out objects' as a technique to store object attributes in lexical, class-wide, hashes - one hash per attribute.

No closures involved.

Perl --((8:>*

Replies are listed 'Best First'.
Re^3: Nailing down closures!
by tphyahoo (Vicar) on Dec 05, 2005 at 16:45 UTC
    Simon Cozens... see the article I linked to above.

    Since this terminology seems to be at least slightly controversial, and I'm not 100% sure about my understanding, and this whole thread is about "nailing down" perhaps you could link to something beginner-oriented that espouses your views of inside-outs?

Re^3: Nailing down closures!
by chromatic (Archbishop) on Dec 05, 2005 at 18:42 UTC
    No closures involved.

    Why do you need object attributes then if you never use them?

Re^3: Nailing down closures!
by demerphq (Chancellor) on Dec 06, 2005 at 08:38 UTC

    Going by the code you have posted elsewhere your InsideOut attribute handlers are actually closures. At least iirc, you use lexical hashes to store the attribute values and these hashes are declared outside of the subs that reference them, therefore those subs are closures. (Dump one of them with DDS and see what happens).

    ---
    $world=~s/war/peace/g

Re^3: Nailing down closures!
by adrianh (Chancellor) on Dec 06, 2005 at 12:44 UTC
    By whom? I know 'inside out objects' as a technique to store object attributes in lexical, class-wide, hashes - one hash per attribute.

    See this post for one example.

    I don't think it's original to Barrie though. It's a analogy I've come across several times outside the Perl world in either direction (closures are inside out objects, objects are inside out closures) depending on who knows what.

    Not that I think it's a particularly good analogy mind...