copy yourself ?

Sean Charles bibbers at onetel.net.uk
Thu May 22 22:15:15 UTC 2003


On Thursday, May 22, 2003, at 08:33 PM, jan ziak wrote:

> hi. i would like to ask whether some squeaker has ever seen an object 
> which
> is capable of copying itself.
Yes I have but I was incredibly dunk at the time.

> for example, i have a glass in front of me -
Is it empty?

> certainly an object - but i have never seen any glass copying itself in 
> front
> of me when i say "copy yourself" to it.
Do you speak fluent Glassish? If not, forget it. I have tried this also 
with paper money and it doesn't work either. Why waste time with 
glasses ;-) And perhaps they are shy and on;y do it when nobody is around?
  if a tree falls down in the forest and nobody is around to hear it, does 
it still make a sound and does my wife still think its all my fault anyway?

>  in contrary, i have only seen people
> or machines capable of copying a glass. the point is that i do not believe
> that any object could copy itself. even DNA which is said to have 
> replicating
> capabilities does not replicate itself as such, but requires a niche 
> capable
> of replicating it. so why, in smalltalk, almost every object can copy 
> itself
> when i send a message to it - it seems absurd to me. doesn't it also to 
> you?
>
Wow, you draw some heavy parallels here dude. Getting real, if you wanted 
an exact copy of an object then, assuming the object cannot do it, how do 
*you* propose that we could do it? A massive factory method that knows 
about all objects, even those not written yet?

It seems entirely practicable to me to ask an object to spew forth another 
one of itself, after all, it 'knows' what baggage it carries and what to 
do to perform the 'cell division'. My toes is I-ching.

> a second problem is that the copying process depends on particularities of
> situation in which someone or something want's to copy an object. copying 
> is
> context dependent. so why has every object in smalltalk only one method 
> for
> copying (well it has three types of copy-methods but the point is that the
> number and meaning of them fixed).
>
A copy is a copy, so why have more than one method unless some 'other copy'
  produces a slightly different copy. Then it's not a copy is it?!..debate.
..

> wouldn't it be more rational to have objects capable of constructing 
> copies
> of objects?

And what you you do if you wanted to copy *one of those object copying 
classes* then? Where do you stop creating things to copy things to copy 
things to copy things....



More information about the Squeak-dev mailing list