Matthew Cline wrote:
> 
> We might want to have a member/method by which we can tell what type of
> variable we're dealing with, so that a function can be passed an arbitrary
> XV, and treat it differently if it's an SV, AV, and so on.
> 
> For SVs, we might want to have a method to determine what form of
> representation the internal data is in: string, int, double, bigint,
> reference, and so on.

These methods common to all types sound to me like a special case of
inheritance (like it is handled in C++ (single inheritance) or COM).

derived vtable contains:
        - base vtable (possibly overwritten entries)
        - additional entries for derived class/interface

Would it make sense to order the types in a tree?
like:

        AnyV (XV?)
        |
-------------------------
|       |      |      |
SV      AV     HV     ...
|
-------------
|   |   | ...
SV representations

Isn't this the way perl5 already "thinks"?

-Edwin

Reply via email to