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

Re: Objects without stashes?

Thread Previous | Thread Next
From:
Eric Brine
Date:
May 25, 2012 10:43
Subject:
Re: Objects without stashes?
Message ID:
CALJW-qGtR-QYw6KBp5Az-oUup-T0maQDtyGwM94=oKKY=vc-mg@mail.gmail.com
On Fri, May 25, 2012 at 1:40 PM, Eric Brine <ikegami@adaelis.com> wrote:

> 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 think all of that be done on cpan by hooking into the method call
checker, so this could actually be prototyped outside of core.

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