Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Slides from NY Inside-Out Talk

by xdg (Monsignor)
on Jan 19, 2006 at 20:37 UTC ( [id://524339]=note: print w/replies, xml ) Need Help??


in reply to Re: Slides from NY Inside-Out Talk
in thread Slides from NY Inside-Out Talk

I drew a distinction between "inside-out" (lexicals for each property) and "flyweight" (single lexical holding hashrefs for each object). That may be arbitrary, but I think it's significant as inside-out, defined that way, makes property names into lexical identifiers that can be checked with strict, unlike hash keys:

# regular object $self->{name} = "Larry"; # name is a hash key # flyweight object, as per Damian's book my @objects; $objects->[$$self]->{name} = "Moe"; # name is a hash key # inside-out object my %name; $name{ refaddr $self } = "Curly"; # name is a lexical variable

I don't have TheDamian's Object-Oriented Perl handy at the moment, but I don't recall that it went beyond the flyweight idea. Abigail-II's talk on Lexical::Attributes was the first I'd seen of it, and I hadn't come across any prior art before Re: Where/When is OO useful?.

I certainly believe that Abigail was building upon Damian's foundation -- a point that I made verbally in the talk on p.9, which shows the evolution from class properties to the flyweight pattern as a setup for explaining the inside-out pattern.

I included Damian's book in the reference as valuable background material in general, as this was an introductory talk and I did cover the flyweight pattern, albeit briefly.

If I have overlooked some prior art there or elsewhere, I welcome a specific correction and citation and would be happy to include it in the talk.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Log In?
Username:
Password:

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

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

      No recent polls found