http://qs1969.pair.com?node_id=524320


in reply to Slides from NY Inside-Out Talk

I'm not sure why Abigail gets credit in slide 2 for something I distinctly remember in Damian's Object-Oriented Perl book, predating Abigail's presentation by roughly 3 years, especially when the last slide also credits Damian's OOP book. Does anyone know why history is being rewritten here?

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: Slides from NY Inside-Out Talk
by xdg (Monsignor) on Jan 19, 2006 at 20:37 UTC

    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.