APM: Inverted objects?
Thomas L. Shinnick
tshinnic at io.com
Fri Sep 14 20:46:27 PDT 2007
At 07:02 PM 9/14/2007, Montgomery Conner wrote:
>AFAIN this tactic was originally proposed by Damian Conway in his
>2000 book 'Object Oriented Perl'... the implementation is typically
>called 'inside-out objects'.
>
>These have been implemented in dozens of ways over the last few
>years, but perhaps the best explanation and description is the
>documentation that comes with Damian's own Class::Std... here:
><http://search.cpan.org/%7Edconway/Class-Std-v0.0.8/lib/Class/Std.pm>http://search.cpan.org/~dconway/Class-Std-v0.0.8/lib/Class/Std.pm
>
>
>good luck,
>Montgomery
The discussion in Class::InsideOut::Manual::About mentions the other
inside-out implementations, and recommends the larger
Object::InsideOut or itself, Class::InsideOut. From the reading I
would recommend either of these "inspired by" modules over the inspiration.
http://search.cpan.org/~dagolden/Class-InsideOut-1.08/
http://search.cpan.org/~jdhedden/Object-InsideOut-3.25/
>On 9/14/07, Tim McDaniel <<mailto:tmcd at panix.com>tmcd at panix.com> wrote:
>I dimly recall a presentation about "inverted objects" or some phrase
>like that. The standard Perl procedure boils down to
> my $obj = {};
> $obj->{foo} = 123;
> $obj->{bar} = 456;
>
>The technique was something like
> my $obj = \0; # some way of generating a unique reference
> $foo{$obj} = 123;
> $bar{$obj} = 456;
>This allows compile-time "member" checking and perhaps other
>advantages that I don't recall right now.
>
>Who thought of this pattern (was it Schwartz?) and where can I read up
>on it again?
>
>--
>Tim McDaniel, <mailto:tmcd at panix.com>tmcd at panix.com
>_______________________________________________
>Austin mailing list
><mailto:Austin at pm.org>Austin at pm.org
>http://mail.pm.org/mailman/listinfo/austin
>
>
>_______________________________________________
>Austin mailing list
>Austin at pm.org
>http://mail.pm.org/mailman/listinfo/austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/austin/attachments/20070914/01b7e9d6/attachment.html
More information about the Austin
mailing list