Re: semantics of copy and mirror
Daniel Ziltener 21 Mar 2026 23:06 UTC
On 3/21/26 18:34, Peter McGoron wrote:
> I don't think `copy` should make deep copying implementation-defined.
> This can cause different performance and also subtle operational changes.
>
> Would it be possible to allow for implementation extensions to the
> default slots of the root object? I am not sure of the consequences of
> such an action, but then deep-copying implementations can implement a
> deep-copy method.
That implementations may extend an srfi is, imo, implied anyways, no?
And yes, maybe it would be better to define `copy` as a shallow-copying
action.
> How does mutating the mirror object of an object affect the object?
>
> Does the "raw list" in immediate-ancestor-list and full-ancestor-list
> mean that the list shares state with the object in some way? The
> definition of immediate-slot-list and full-slot-list do not specify
> that they return "raw list"s.
Yes, I guess the "raw" is not needed. The lists themselves that are
returned are shallow copies.
> It also mentions that the elements are copied as-if by `list-copy`
> (which is now standard in the R⁷RS). Does that mean that all objects
> implement their messages and slots as lists?
I will adjust the wording there, that is indeed an unnecessary
implementation detail.
> Super minor thing: the list of identifiers in the export lists should
> be wrapped in <code> to make them look better.
Adjusted! :)
Best regards,
Daniel Ziltener