join
goran at krampe.se
goran at krampe.se
Wed Sep 27 07:08:28 UTC 2006
Hi fellas!
Lex Spoon <lex at cc.gatech.edu> wrote:
> "J J" <azreal1977 at hotmail.com> writes:
> > Duplicating what others have when you don't have it is important. But
> > if you can improve on it at no extra cost then why not?
>
> You did not address the example I gave:
>
> > > $(1 2 3) join: ', ' "gives: 1, 2, 3"
>
> For this kind of use case, it would be nice if the join called
> asString on the elements of the receiver.
I fainlty remember implementing a method that does the above, but with
this added twist:
#('1' '2' '3') join: ', ' last: ' and ' ==> '1, 2 and 3'
So if anyone is hoing to add something like this, then include this
extra feature too somehow. :)
And since you are then rumming about in Collection and friends - add
#removeAll while you are at it with efficient implementations in
suitable subclasses. I tried a few years back but got my head bitten off
and retreated. ;)
Soo... who is the steward for Collections? :)
regards, Göran
More information about the Squeak-dev
mailing list
|