<br><br><div class="gmail_quote">On Wed, Sep 28, 2011 at 6:12 AM, Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@elte.hu">leves@elte.hu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
the two methods in the subject are for copying the values of the variables from one object to another. The two methods are basically the same, but there are slight differences:<br>
- #copySameFrom: doesn&#39;t use primitive 168 which provides atomic copying if the receiver&#39;s class is the same as the argument&#39;s class.<br>
- #copyFrom: doesn&#39;t copy the variables if they have the same name, but different indices in the two objects.<br>
<br>
So my suggestion is to merge the two features into one method: use the primitive and copy the variables independently of their indices. But I&#39;m not sure which name should we use.<br>
#copyFrom: is widely used, but beginners used to expect it to work like #copyFrom:to: without an upper bound.<br>
#copySameFrom: is not widely used, but it&#39;s also less confusing for beginners.<br>
Maybe a third name would be the best choice, e.g.: #copyVariablesFrom:,<br>
#copySlotsFrom:, maybe #copyValuesFrom:.<br>
What do you think?<br></blockquote><div><br></div><div>copyValuesFrom:</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
Cheers,<br><font color="#888888">
Levente<br>
<br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>