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

Re: Objects without stashes?

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
May 25, 2012 13:20
Subject:
Re: Objects without stashes?
Message ID:
20120525202007.GA4509@cancer.codesimply.com
* Eric Brine <ikegami@adaelis.com> [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:

  http://markmail.org/message/3wwf7pra3whfks5n

Later, I produced a shambling implementation:

  http://rjbs.manxome.org/rubric/entry/1739

  http://advent.rjbs.manxome.org/2010/2010-12-24.html

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.

-- 
rjbs

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About