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

Re: Objects without stashes?

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
May 25, 2012 08:41
Subject:
Re: Objects without stashes?
Message ID:
20120525154102.GD1097@fernweh.plasmasturm.org
* Leon Timmermans <fawaka@gmail.com> [2012-05-25 16:55]:
> I think stashes of globs of other stuff is paradigm that fails, and
> I don't think I stand alone in that. We all know how much effort it is
> to work with them, even when abstractions are available that make them
> less inconvenient. It makes me wonder why we're sticking to it so
> badly?

At the far end of that question lies, of course, Perl 6. :-)

> What if we simply added a vtable to all objects when blessing? At its
> minimal, this vtable would only need to support two methods:
> fetchmethod and ref, though more may be prudent (meta would be an
> obvious one, clone and destroy may be useful too).

How do things get into the vtable? What syntax is provided, how does it
interoperate or interact with the traditional approach of writing subs
in a package? Do you break every single line of meta-programming code in
Perl ever written? Do you half break it? Or do you try somehow to make
this change transparent? How much does that limit you?

Or am I misunderstanding – is all you want a pure implementation detail?
(I.e. what continues to look like a package to Perl code is implemented
using vtables underneath so that it’s easier to code against.)

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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