[Pharo-dev] Probably stupid... question about string printString.

Stephane Ducasse stepharo.self at gmail.com
Sat Oct 21 15:12:45 EDT 2017


Yes this is my point. I was surprised to get ' on the transcript.

Stef

On Sat, Oct 21, 2017 at 7:49 PM, Alistair Grant <akgrant0710 at gmail.com> wrote:
> On Sat, Oct 21, 2017 at 05:28:21PM +0200, Stephane Ducasse wrote:
>> Hi
>>
>> I would like to really understand why
>> 'foo' printString
>> >>>
>> '''foo'''
>>
>> and not why this is not
>>
>> 'foo'
>>
>> itself.
>>
>> Stef
>
> I can't comment on the original thinking behind this, but I agree that
> something like:
>
>
> String>>printOn: aStream
>         "Represent the receiver on the supplied stream"
>
>         aStream nextPutAll: self
>
>
>
> would be much better.
>
> If we're displaying values such as numbers and strings in a UI, e.g.
> table, we normally don't want the strings always enclosed in quotes.
>
> Cheers,
> Alistair
>
>




More information about the Pharo-dev mailing list