develooper Front page | perl.perl6.internals | Postings from October 2001

Re: PMCs and how the opcode functions will work

Thread Previous
From:
Dan Sugalski
Date:
October 8, 2001 18:41
Subject:
Re: PMCs and how the opcode functions will work
Message ID:
5.1.0.14.2.20011008213846.023121f0@pop.sidhe.org
At 12:00 AM 10/9/2001 +0100, Simon Cozens wrote:
>On Mon, Oct 08, 2001 at 06:36:32PM -0400, Dan Sugalski wrote:
> >       PACKAGE *package;
> >       INTVAL  base_type;
> >       INTVAL  int_type;
> >       INTVAL  float_type;
> >       INTVAL  num_type;
> >       INTVAL  string_type;
>
>Why are all these in the vtable? They seem like PMC-ish things
>to me.

Well, they really describe how the PMC behaves, which is the purview of the 
vtable functions. Keeping them there means things will stay in sync, since 
the vtable methods are what's responsible for a variable acting a 
particular way.

These are also replacing the type method for scalar variables. (There's 
still one for individual elements of an aggregate) Consider them a 
pre-memoized version of the scalar type. :)


					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Previous


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