Ilya Zakharevich on Mon, 28 Aug 2023 07:44:01 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: bug in simplify_shallow


On Sun, Aug 27, 2023 at 04:13:54PM +0200, Karim Belabas wrote:
> What "the inserted element" means is ambiguous in the context of PARI's
> memory model. What the implementation does is return a direct pointer to
> the new list entry, that inserted element being a clone of the input x.
> 
> What Bill and I suggested was to return "a copy of the inserted element"
> instead. I don't really see a scenario where this would break
> compatibility ... except this would make insertion about twice slower,
> even in cases where the returned value is ignored.

IIRC, in Perl the lexical are not removed, but instead
         are MARKED for removal.

In the beginning of each “statement”, what was marked for removal
before this is actually removed.

Hope this helps,
Ilya