<br><br><div class="gmail_quote">On Feb 19, 2008 2:29 AM, Ron Teitelbaum &lt;<a href="mailto:Ron@usmedrec.com">Ron@usmedrec.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Marcin,<br><br>I&#39;m not a fan of using #become. &nbsp;I will use it for very specific behavior<br>when I need to retain pointers to an object. &nbsp;For example for implementing a<br>proxy. &nbsp;In that case become is a very useful tool. &nbsp;I think that #become is<br>
overkill for this situation, but I won&#39;t argue that it doesn&#39;t work. &nbsp;In<br>most cases you have a well encapsulated collection. &nbsp;That collection is not<br>referenced outside the object so you can just reinitialize your collection</blockquote>
<div><br>Re-initialize how? I can&#39;t see a way to run object initialisation over again on an existing object.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>without #become. &nbsp;If it is complicated enough to worry about pointers I<br>wouldn&#39;t use #become. &nbsp;Someone will get lost and miss your #become hidden<br>inside #removeAll: . &nbsp;I&#39;m not saying this will cause problems but I think I<br>
would rather work with the collection directly instead of using the #become.<br><br>Also if you are working on a collection that is large enough to worry about<br>performance then you are probably missing a database that would<br>
significantly improve your performance.<br><br>Ron Teitelbaum<br><br><br><br>________________________________________<br>From: <a href="mailto:beginners-bounces@lists.squeakfoundation.org">beginners-bounces@lists.squeakfoundation.org</a><br>
[mailto:<a href="mailto:beginners-bounces@lists.squeakfoundation.org">beginners-bounces@lists.squeakfoundation.org</a>] On Behalf Of Marcin<br>Tustin<br>Sent: Monday, February 18, 2008 8:43 PM<br>To: A friendly place to get answers to even the most basic questions<br>
aboutSqueak.<br>Subject: Re: [Newbies] How to empty a collection?<br><div><div></div><div class="Wj3C7c"><br>My own testing suggests that references to the object remain in place. I<br>would guess that that is the whole point of become.<br>
On Feb 19, 2008 1:38 AM, cdrick &lt;<a href="mailto:cdrick65@gmail.com">cdrick65@gmail.com</a>&gt; wrote:<br>&gt; Isn&#39;t Cedrick&#39;s aida solution going to be significantly faster?<br>&gt;<br>this is not mine :)<br><br>
butI&#39;d interested to see if it&#39;s a good use of #become:... Does it<br>keep references ? is it safe ?<br><br>Thanks<br>_______________________________________________<br>Beginners mailing list<br><a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br><br><br>_______________________________________________<br>Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br>