semantics of #clone?

Lex Spoon lex at cc.gatech.edu
Wed Jun 25 10:34:36 UTC 2003


Yoshiki.Ohshima at acm.org wrote:
> Lex wrote:
> > Right now, Squeak's clone does do as much as nil out the variables --
> > it's in fact the same primitive as the default shallowCopy.  This seems
> > like a good idea for Squeak, where safety is a higher priority than
> > speed.
> 
>   Ah, does it?  What I meant by nil-out is to clear the newly created
> object *before* copying the actual value. 

Oh, yes, you're right  -- I posted too quickly.  There is no variable
left undefined, so there is no need to nil anything out.


Lex



More information about the Squeak-dev mailing list