[squeak-dev] History of #inject:into: and #do:separatedBy:

Eliot Miranda eliot.miranda at gmail.com
Mon Jan 3 20:01:23 UTC 2011


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
<Lou at keystone-software.com>wrote:

> 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:Lou at Keystone-Software.com http://www.Keystone-Software.com
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20110103/ca5b311d/attachment.htm


More information about the Squeak-dev mailing list