Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Inheritance: the root of the problem

by Moron (Curate)
on Aug 07, 2006 at 15:27 UTC ( #565965=note: print w/replies, xml ) Need Help??

in reply to Inheritance: the root of the problem

If it were me, the first thing I would do is come up with a new glossary for such a "rebel" object, e.g. a "clobe" or "imp" or whatever to avoid confusion with Perl's traditional objects (unless you make your programming users swear allegiance to your cause). An object is usually "new"ed, whereas a "clobe" might be "spun", "baked", "smoked" or whatever you fancy or if "imp" then it might by "incarnated" (so perhaps "incarnation" to replace "instance".

The replacement mechanism for "bless" (..."curse?" ;)) would have to be managed in your own data. But a module-level hash could carry that off. I am not however sure that you can modify a variable in a particular incarnation (closure instance) without having to replace the whole thing and that could be very tricky to code indeed - unless you imposed rules on your imps (or clobes) that would be rather unnatural for closures.


Free your mind

  • Comment on Re: Inheritance: the root of the problem

Replies are listed 'Best First'.
Re^2: Inheritance: the root of the problem
by apotheon (Deacon) on Aug 08, 2006 at 03:31 UTC

    I've actually been partial to the term "clob" since the moment I came up with the idea — the first two letters of each word in the term "closure object". It hadn't occurred to me to invent a whole new jargon for it. That'd be fun, and probably kind of effective if I were to attempt to market the whole idea and sell books about it, but I'm a long way from that right now.

    Let's call them "clobs" for now. More terminology can come later, when I figure out what the specific actions are that would be described by the terms.

    print substr("Just another Perl hacker", 0, -2);
    - apotheon
    CopyWrite Chad Perrin

      Gah! No, no, please let us by all means not call them clobs. ;-)

      If God had meant us to fly, he would *never* have given us the railroads.
          --Michael Flanders

        Whoops, I hadn't thought of that. Maybe I'll have to come up with a different term. I guess "closure-object" will have to suffice in the meantime.

        print substr("Just another Perl hacker", 0, -2);
        - apotheon
        CopyWrite Chad Perrin

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2018-05-21 02:12 GMT
Find Nodes?
    Voting Booth?