Hi,
Does anyone know anything about the history of #inject:into: and/or #do:separatedBy:? I would like to know when they first appeared in Smalltalk. Were they present from the beginning? I ask because I get into conversations with my two sons about the pros and cons of programming languages. My oldest son, knows (some) and likes Smalltalk but programs in C++ and Java for Google. My younger son is learning Java. I help him with some of his homework (I don't know Java but I can still help) and when doing so, try to point out how things might be done in Smalltalk. Don't get me wrong, I want him to learn Java but would also like to let him know that there are other languages out there. I think #inject:into: and #do:separatedBy: are good examples of how things can be added to Smalltalk after the syntax of the language has been defined because Smalltalk has so little syntax (and because blocks of code are objects). I think adding something like these to Java would probably require modifying the Java compiler and maybe the VM. Another example might be #injectWithIndex:into:. I don't know if a method like that is all that valuable but if I needed it, I could add it without much trouble. Thanks in advance for anything anyone can tell me. Lou ----------------------------------------------------------- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:[hidden email] http://www.Keystone-Software.com |
Hi Louis,
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's. It wasn't present in the late 80's images such as VW 2.5.
HTH Eliot On Mon, Jan 3, 2011 at 10:56 AM, Louis LaBrunda <[hidden email]> wrote: Hi, |
Hi Eliot,
> 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's. It wasn't present in the >late 80's images such as VW 2.5. Thanks for this bit of history, it does help. Not that this topic is all that important but I do think it is valuable to understand how to judge things by other than their popularity. Lou ----------------------------------------------------------- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:[hidden email] http://www.Keystone-Software.com |
Free forum by Nabble | Edit this page |