Brace Bracket assignment for two arguments vs >>become: (Was: Squeak programming question)

Mark Wai mwai at ibm.net
Tue Mar 23 05:19:31 UTC 1999


At 08:40 PM 3/22/99 -0500, you wrote:

>Yes.  assignment is way too fast to register on this scale.  become: 
>is another story -- and it probably doesn't do what you seem to want 
>it to do.  Let's take the second point first.
>
>Here is the Squeak comment for become:
>
>snip
>
>become: is a very expensive operation in Squeak.
>
>snip
>

Andrew --

First of all, thanks for your reply.  

Actually, my question was not so much on why assignment is quick and why
become is slow (I knew these already), I should have rephased it a bit better:

Is   {a.b} := {b.a}  functionally equivalent to a become: b ?

Is so, and since {} plus assignment operator is so much faster, can't we
reimplement become using {} instead (or whatever {} uses)?

Now that I am writing this email,  I am going to check if {a.b} := {b.a}
really swap all the pointers or not (i.e. true two way become).   

--
Mark Wai
Wator InnoVision





More information about the Squeak-dev mailing list