[Packages] Split-Join in development universe etc

Jason Johnson jason.johnson.081 at gmail.com
Thu Aug 9 05:00:44 UTC 2007


On 8/8/07, Colin Putney <cputney at wiresong.ca> wrote:
>
>
> I wouldn't call it a no-brainer. In fact, if it was up to me, I
> wouldn't add these methods to the base image, for two reasons:
>
> 1. They're not idiomatic Smalltalk. If you need to join a collection
> of strings into a single string with a separator it's easy to do with
> #streamConents: and #do:separatedBy:. If you find you're doing it so
> often that you want something more succinct, that's a code smell.



Well, the interesting thing about this package is that it joins any
collection with any other collection, it's not just strings.

Wanting code to be concise is code smell?  If you meant adding a method to
collections that only joins strings is a code smell then ok, but
otherwise.... well I strongly disagree to say the least.

2. The base image should be getting smaller, not bigger. Split-join
> can live quite well as an external package.



Well, it's a good point that the image should get smaller, but perhaps by
using this reoccurring pattern it would actually get Smaller.  Someone would
have to check and see.

I've been asked about the lack of #join: a few times by people coming
> to Smalltalk from Ruby or Python. They were incredulous that such a
> fundamental thing was missing. But in Smalltalk it's not fundamental
> - Smalltalk is object-oriented, not string-oriented.
>
> Colin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070809/cae6fff2/attachment.htm


More information about the Squeak-dev mailing list