join

J J azreal1977 at hotmail.com
Mon Sep 25 19:46:22 UTC 2006


What about:

#( 241 243 248 ) joinWith: #(255 253).

Now you could make the argument that what I'm going for is a string (the 
numbers are almost certainly wrong, but I was trying to encode some telnet 
options), but I'm sure with some sleep I can come up with some examples 
where you would want to join a collection with collections or anything else.

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?


>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: 25 Sep 2006 14:25:58 +0200
>
>"J J" <azreal1977 at hotmail.com> writes:
> > I think the best version of all these things was recomended by Kieth,
> > and his version just joined collections.  If they happen to be string
> > then it makes a string.
>
>
>Isn't returning a string practically the only use case?
>
>
>   $('red' 'green' 'blue') join: ', '    "gives: red, green, blue"
>
>   $(1 2 3) join: ', '    "gives: 1, 2, 3"
>
>
>If "join" is not to be the above method, the above method would still
>be nice to have.
>
>
>-Lex
>
>





More information about the Squeak-dev mailing list