On Mon, Aug 08, 2005 at 06:04:51PM +0200, "TSa (Thomas Sandla�)" wrote:
> Autrijus Tang wrote:
> >If I'm mistaken, please let me know, preferably by suggesting
> >new arrangements on the diagram. :-)
> 
> Without judging your mistakes, here are my comments to the
> container picture.
> 
> 1) I would move the ::name to the Pad level. The idea is
>    that ::name is some less specific supertype of the
>    Fantastique Four ($&@%) if more than one of them exists
>    on the container level.

Please annotate this idea with the code.  You mean:

    my $a = 3;
    my @a = 1..10;

And somehow ::a is the supertype of the two!?

> 2) I don't understand why you need two levels of indirection
>    firstly the container and then the cell. Not to mention
>    the third one to the tied thingy.

Because assignment (=), binding (:=) and tie are operating on different
levels, the same way Perl 5 typeglobs and tie works.

> 3) Why is the link from the container labeled with :=
>    but the link between the cell and the value with =?

Because you change container<->cell relationship with binding (:=) and
cell<->value relationship with assignment (=).

>    I would consistently dispatch *all* operators including
>    :=, = and =:=. Preferably at compile/check time. Container
>    types are then on the same level as any other parametric
>    type. This "naturally" explains why your "is IType" can
>    be changed like underwear. For the type system it is just
>    another mutator. Whatever it does to the tied object takes
>    effect only by changing the type and hence the methods which
>    are applicable.

Again, please annotate your idea with code.  For scalars, I cannot see
how and assignment are supposed to be dispatched to the same
underlying object.  It seems to me that:

    $x := $y
    
and

    $x = $y

are manipulating two different entities, as I have shown in the drawing.

I would also like to know how the perl 5 idea of tie can be explained
with coercing the variable into another parametric type.  It seems to
me that tie() is a runtime operation that associates a cell with an
object, and the concrete object then intercepts access into that cell.

Thanks,
/Autrijus/

Attachment: pgpCZrXZWLfie.pgp
Description: PGP signature

Reply via email to