Hi Louis,<div><br></div><div>     inject:into: is present in Smalltalk-80 version 2 and so has been there since Smalltalk-80 was released to the world.  I think do:separatedBy was introduced in VisualWorks some time in the 90&#39;s.  It wasn&#39;t present in the late 80&#39;s images such as VW 2.5.</div>
<div><br></div><div>HTH<br>Eliot</div><div><br><div class="gmail_quote">On Mon, Jan 3, 2011 at 10:56 AM, Louis LaBrunda <span dir="ltr">&lt;<a href="mailto:Lou@keystone-software.com">Lou@keystone-software.com</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>
Does anyone know anything about the history of #inject:into: and/or<br>
#do:separatedBy:?  I would like to know when they first appeared in<br>
Smalltalk.  Were they present from the beginning?<br>
<br>
I ask because I get into conversations with my two sons about the pros and<br>
cons of programming languages.  My oldest son, knows (some) and likes<br>
Smalltalk but programs in C++ and Java for Google.  My younger son is<br>
learning Java.  I help him with some of his homework (I don&#39;t know Java but<br>
I can still help) and when doing so, try to point out how things might be<br>
done in Smalltalk.  Don&#39;t get me wrong, I want him to learn Java but would<br>
also like to let him know that there are other languages out there.<br>
<br>
I think #inject:into: and #do:separatedBy: are good examples of how things<br>
can be added to Smalltalk after the syntax of the language has been defined<br>
because Smalltalk has so little syntax (and because blocks of code are<br>
objects).  I think adding something like these to Java would probably<br>
require modifying the Java compiler and maybe the VM.<br>
<br>
Another example might be #injectWithIndex:into:.  I don&#39;t know if a method<br>
like that is all that valuable but if I needed it, I could add it without<br>
much trouble.<br>
<br>
Thanks in advance for anything anyone can tell me.<br>
<br>
Lou<br>
-----------------------------------------------------------<br>
<font color="#888888">Louis LaBrunda<br>
Keystone Software Corp.<br>
SkypeMe callto://PhotonDemon<br>
mailto:<a href="mailto:Lou@Keystone-Software.com">Lou@Keystone-Software.com</a> <a href="http://www.Keystone-Software.com" target="_blank">http://www.Keystone-Software.com</a><br>
<br>
<br>
</font></blockquote></div><br></div>