deep copy in assign and return
Closed this issue · 3 comments
We need deep copy in assign and return to not pass reference but copy of value.
I added deep_copy
to return
values and fixed its usage in assignments. I'll re-generate the pacakges and submit them at 16:00 if the image gets built in the afternoon.
@jreidinger Going back to our discussion in person — I think integer
s aren't a problem. It is true hat they can overflow from Fixnum
to Bignum
, but Bignum
s are immutable (there is no operation that would change Bignum
's numerical value), so no deep copy is needed for them.
I also think about term
s and path
s. From the code in Ruby bindings it seems thay are pretty much immutable now (except Term#[]=
). If they are only modified via builtins, maybe we can avoid copying them too. What do you think?
I agree. I think that main problem is map an list, which is sensitive to modifications