develooper Front page | perl.perl5.porters | Postings from May 2012

Re: Objects without stashes?

Thread Previous | Thread Next
Ricardo Signes
May 25, 2012 13:20
Re: Objects without stashes?
Message ID:
* Eric Brine <> [2012-05-25T13:40:38]
> Interesting! What if it was possible to overload method resolution by
> placing magic on the object? The object wouldn't even need to be blessed,
> so gone is the requirement for a stash. Seems this avoids all compatibility
> problems while providing a completely flexible system. It would allow one
> to create (a module that creates) anon classes, or even class-less objects
> like in JavaScript.

I proposed this in 2008:

Later, I produced a shambling implementation:

It was very exciting, to me, to have things half-working, but the second 90%
was problematic.  Florian's anonymous stashes were useful, but wouldn't survive
threaded builds, and the idea of building it all with magic on the stashes was
grody, to put it lightly.

To what extent does this sort of thing prefigure Stevan Little work on p5-mop?
While I'd love to have this feature, we wouldn't want the two to play against
one another.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About