Request for review Daniel Ziltener (09 Mar 2026 01:24 UTC)
Re: Request for review Arthur A. Gleckler (09 Mar 2026 01:32 UTC)
Re: Request for review Peter McGoron (09 Mar 2026 01:45 UTC)
Re: Request for review jobol (09 Mar 2026 18:52 UTC)
Re: Request for review Daniel Ziltener (09 Mar 2026 22:36 UTC)
Re: Request for review Daniel Ziltener (11 Mar 2026 22:59 UTC)
Re: Request for review Daniel Ziltener (09 Mar 2026 22:39 UTC)
Re: Request for review Peter McGoron (09 Mar 2026 23:22 UTC)
Re: Request for review Daniel Ziltener (11 Mar 2026 23:12 UTC)
Re: Request for review Arthur A. Gleckler (11 Mar 2026 23:23 UTC)
Re: Request for review jobol (11 Mar 2026 21:38 UTC)
Re: Request for review Daniel Ziltener (11 Mar 2026 22:48 UTC)
Re: Request for review jobol (13 Mar 2026 07:50 UTC)
Re: Request for review John Cowan (13 Mar 2026 14:16 UTC)
Re: Request for review Daniel Ziltener (13 Mar 2026 15:00 UTC)
Re: Request for review jobol (13 Mar 2026 15:39 UTC)
Re: Request for review Daniel Ziltener (13 Mar 2026 22:43 UTC)
Re: Request for review John Cowan (14 Mar 2026 07:47 UTC)
Re: Request for review jobol (14 Mar 2026 07:54 UTC)
Re: Request for review Daniel Ziltener (15 Mar 2026 23:30 UTC)

Re: Request for review jobol 13 Mar 2026 07:50 UTC

Le Wed, 11 Mar 2026 23:48:27 +0100,
Daniel Ziltener <xxxxxx@lyrion.ch> a écrit :

> On 3/11/26 22:37, jobol wrote:
> > Hello Zilti,
> >
> > 1. My common understanding of 'clone' method is, with vocabulary
> > of srfi 263, that slots of an object are copied into a new instance.
> > Then same parents, same methods, values copied.
> This is, as written in the description of the `clone` message, not
> correct.
> > 2. The message 'clone' is probably not well named and can lead to
> > confusion (see above). The semantic of its action is nearest to a
> > kind 'new'. But 'new' doesn't seem to be a good choice because also
> > of confusion because it often has arguments that are copied to the
> > created instance. Possible other choices: derivate, instanciate,
> > create, make.
> "new" has a very different semantic; it means creating an instance of
> a class. Since this is a prototype object system, there are no
> instances, just classes. "Instanciate" would therefore also be a bad
> choice; both suggest that there is shared structure between class and
> (derived) instance. "create" and "make" suggest, IMO, that a
> completely new and separate thing is created, which is not accurate
> either. "Self", the language which pioneered prototype object
> systems, uses "copy"; I guess I could also rename it to that. "clone"
> feels close enough to "copy" and is the name used in Prometheus, so I
> kept that.

Hi Daniel,

Thank you for your explanations.

Let me advocate a change. The method 'clone' usually has the meaning of
copying. Here some links that tend to proof my assertion:

 - https://en.wikipedia.org/wiki/Clone_%28Java_method%29
 - https://wiki.krybot.com/en/Programming-Languages/Eiffel/Chapter-53
 - https://doc.rust-lang.org/std/clone/trait.Clone.html
 -
   https://pkg.go.dev/github.com/huandu/gohttps://pkg.go.dev/github.com/huandu/go-clone-clone

And you can find some other. Confusing isn't it?

In my opinion the method should be called 'fresh-child' or 'procreate'.

I also think that there is a need for a cloning (copying) method that
will return a copy of immediate slots in a fresh instance. Possible
names are clone, copy, twin, fresh-copy, fresh-twin, ...

[snip]

> > 6. From code:
> >
> >    (define-object P (*the-root-object*) (a set-a! 0))
> >    (define-object C (P) (a 1))

At this point

  ((C 'mirror) 'immediate-slot-list)

produces

  ((a #f value) (mirror #f method) (parent #f parent))

without 'set-a!'. Is it intended?