Of course I can test this on parrot, but that gives me the answer for today,
not for parrot objectives.
Something like
clone P0, P1
where P1 is an array (or hash, or something else) will clone P1 elements, or
clone references for the P1 elements?
Best regards,
Alberto
--
Departamento de Informatica - Universidade do Minho
"The C Programming Language -- A language which combines the
flexibility of assembly language with the power of assembly language."
> Hi, all.
>
> clone P0, P1
>
> where P1 is an array (or hash, or something else) will clone P1 elements, or
> clone references for the P1 elements?
The former, and rescursively, which will be great fun for self
referencing structures ;)
> Best regards,
> Alberto
leo
Um, why? Deep copy is seldom needed, where shallow copy is used all
the time. How do you shallow copy?
Luke
[ clone ]
> Um, why? Deep copy is seldom needed, where shallow copy is used all
> the time. How do you shallow copy?
We don't have a notation to say shallow or deep. Proably the clone
opcode needs one extra param stating the desired behavior.
> Luke
leo
Ah, it's not that bad if we get the GC machinery in the act to help
with data structure marking...
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
Because I said so? :-P
>Deep copy is seldom needed, where shallow copy is used all
>the time. How do you shallow copy?
With assign.