copy yourself?

Philip Metz philip.metz at sympatico.ca
Thu Jun 5 07:01:54 UTC 2003


On Wed, 2003-05-28 at 10:48, jan ziak (or a reasonable facsimile) wrote:
> i have concluded from your reaction the following: we can state that the 
> existence of a #copy method is consequence of having encapsulation ... and if 
> we would like to have encapsulation then it forces us to have such #copy 
> yourself methods as in squeak.
> 
> my reaction and question then is: why do we not allow access to the internal 
> state of an object O1 only to the object R which replicates O1 ? the 
> encapsulation is not broken in this case because objects expect R do not have 
> access to the internal state of O1.
> 

Jan:

1) Smalltalk (and any other object-oriented language) works fine the way
it is. Try to understand it before you fix it. (remember that clock you
tried to "fix" when you were a child?)

2) In this post, you are simply restating a question (the "copier"
conundrum) that you asked before. I believe Colin Putney has adequately
answered that question. Please read and accept his post.

3) Your initial questions (about copying, text manipulation, etc.) arise
from pushing an analogy (the "object" analogy) too far. All analogies
break down eventually when you examine their details, even exceptionally
useful ones such as the object analogy. "Objects" in Smalltalk are not
the SAME as 'real' (whatever that means) objects, even though the
analogy ("they are LIKE real objects in certain aspects") is sometimes
useful. Again, Goran's* post has clearly explained this and I believe it
settles the issue.

4) The philosophical questions raised (reality vs. perception, etc.) are
most definitely off-topic. They remind me of why I stopped studying
philosophy. I prefer to just write code that does stuff.

5) Any thread eventually says everything that is worth saying about a
subject. Any further posting (AFTER this post, of course :-) can only
restate things that have already been said. 




* (Goran: Excuse me, I don't know how to produce the proper accent in
this e-mail client.) 








More information about the Squeak-dev mailing list