develooper Front page | perl.perl6.internals | Postings from February 2002

Re: PMCs, setting, and suchlike things

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
February 14, 2002 08:14
Subject:
Re: PMCs, setting, and suchlike things
Message ID:
200202141612.QAA11984@gizmo.fdgroup.co.uk
Dan Sugalski <dan@sidhe.org> wrote:
> At 3:53 PM +0000 2/14/02, Dave Mitchell wrote:
> >My outstanding niggle is when a typed variable is undef. I guess we
> >need a generic Perl_Undef_But_Typed vtable type, which behaves mostly
> >like the PerlUndef type, but saves a pointer to its 'real' vtable in
> >self->data or whatever. When it's assigned to, it upgrades itself to
> >its real type, then passes control to it's real type's assign method.
> 
> That's a good point. I'll have to think about that a little bit. We 
> could either have an undef flag or something and take definedness 
> entirely out of the hands of the vtables,

which would involve a conditional branch for every access of every PMC :-(

> or use the "X or child of 
> X" mechnanism to allow for undefs as well.

Have you any feel for what this child of X mechanism is?


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