copy yourself ?

Chris Burkert christian.burkert at s2000.tu-chemnitz.de
Thu May 22 20:52:06 UTC 2003


jan ziak wrote:
> hi. i would like to ask whether some squeaker has ever seen an object which 
> is capable of copying itself. for example, i have a glass in front of me - 
> certainly an object - but i have never seen any glass copying itself in front 
> of me when i say "copy yourself" to it. 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?
> 
> 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).
> 
> wouldn't it be more rational to have objects capable of constructing copies 
> of objects? 

But this wouldn't be 'objectoriented' in it's definition. Remember that 
the objectoriented way is not an exact simulation of the real world (but 
it comes close to it).

Maybe you should take a look at 'functional programming'.

Not everything in the world is objectoriented and not everything is 
functional ... you have to decide for each problem what would be the 
'best' environment to solve it.

Regards
            Chris Burkert

PS: Smalltalk is still my favourite language for solving problems!!!
-- 
http://www.chrisburkert.de/



More information about the Squeak-dev mailing list