>>> What would you say the right thing is?
>> 
>> Well, intuitively I would say that converting an Array of Character 
>> instances (say 5 instances) using "asString" would give me a String of size 
>> 5. Also, "Character space asString" does NOT give me 'Character space' but 
>> actually ' '.
> Maybe its just me, but I'd rather not have
> SequenceableCollection >> asString mean "If I contain only elements which may 
> represent characters, return a string containing those, if not, return my 
> printString"


yes you are not the only one. Thanks I was thinking about that after my post :)

>> Having a fallback on printString is of course fine, in Object. But... well, 
>> I haven't thought *deeply* on this, but a sequencable collection of 
>> Characters should IMHO be able to produce a String
>> regards, Göran
> 
> And it is, using either 
> collection as: String, or 
> String withAll: collection
> In both cases you then explicitly specify that this collection will contain 
> only elements which can be converted to a string, rather than have a later 
> reader of the code have to question "hmmm, does the use of asString here mean 
> he'll be using the collections printString, or the string with its elements?"

I'm curious about the senders of asString, especially to collection.

Stef
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to