APM: Inverted objects?

Tim McDaniel tmcd at panix.com
Fri Sep 14 15:39:32 PDT 2007


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, tmcd at panix.com


More information about the Austin mailing list