[ANSI-Smalltalk] Behaviour of #collect:

Andres Valloud andres.valloud at gmail.com
Thu Sep 25 10:54:40 BST 2008


I'd rather do this as well.  It seems to me it's natural (?) to expect
that some cases of collect: will behave in an interesting manner, such
as with strings and byte arrays.

Andres.

On Mon, Sep 22, 2008 at 8:45 PM, Ralph Johnson <johnson at cs.uiuc.edu> wrote:
> If that is what it takes to make #collect: work the way you want, then
> I don't want it to work that way.  In my opinion, you are making the
> implementation very complicated for only a slight improvement in
> behavior.
>
> I would rather just say "aString asArray collect: [:each | each
> codePoint]" when I want #collect: to return an array.
>
> -Ralph
>
> _______________________________________________
> ANSI-Smalltalk mailing list
> ANSI-Smalltalk at lists.openskills.org
> http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk
>



More information about the ANSI-Smalltalk mailing list