[Packages] Split-Join in development universe etc
Colin Putney
cputney at wiresong.ca
Wed Aug 8 06:31:44 UTC 2007
On Aug 7, 2007, at 10:00 PM, Jason Johnson wrote:
> I was under the impression that now is the best time ever to get
> needed things into the image. The "Message eating null" and
> namespaces are big controversial things that can't be ignored once
> present. But this package seems like a "no-brainer" since it's
> just method adds and they put in something that seems glaringly
> missing from Squeak at the moment. If you have tests and things
> you should still try I would say, there might still be time.
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.
2. The base image should be getting smaller, not bigger. Split-join
can live quite well as an external package.
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
More information about the Squeak-dev
mailing list
|