join

J J azreal1977 at hotmail.com
Wed Sep 27 03:56:36 UTC 2006


Actually, the implimentation that Keith had did a double dispatch as I 
recall (I guess I will dig that up and resend it if I ever get more then 5 
minutes online at a time) and in this case, i.e. the argument to join: is a 
string, would result in a string.


>From: Lex Spoon <lex at cc.gatech.edu>
>Reply-To: The general-purpose Squeak developers 
>list<squeak-dev at lists.squeakfoundation.org>
>To: squeak-dev at lists.squeakfoundation.org
>Subject: Re: join
>Date: 26 Sep 2006 23:02:09 +0200
>
>"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 expect that this kind of use case, where you are turning a
>collection into a space- or comma-delimited string for output, is the
>most common use case.
>
>
>-Lex
>
>





More information about the Squeak-dev mailing list