[Glass] [Pharo-dev] printString and asString

Martin McClure martin.mcclure at gemtalksystems.com
Mon Jan 6 12:05:29 PST 2014


On 01/05/2014 11:54 PM, Otto Behrens wrote:
> Thank you everyone for your comments.
> 
> I agree with Martin's comments and Stef's most recent one. Some of the
> messages may not have reached the other lists as this was actually
> posted to glass and pharo.
> 
> Is this the right conclusion of what we're going to do now?
> 
> - On Pharo and GemStone, we will remove the asString behaviour from
> Object. Perhaps this is just an item on the list to deprecate and
> gradually remove. Practically, a lot of people would not be using
> asString in the best way, right?

I've filed a request to deprecate those uses of #asString in GemStone/S.
I don't know what version that might take effect in (it's too late to
get that into 3.2) but in the meantime avoiding use of #asString for
non-string-like objects is a good pattern.

> 
> This brings back a question regarding displayString, or something
> similar. It seems as if many people need something like this.
> 
> I need for example a string representation of objects generally to
> display in anchors in our seaside application. We have a class
> DomainObject from which most of our classes inherit, so this is
> probably the place to add a 'displayString' for something like this.

This sounds good to me.

Regards,

-Martin



More information about the Glass mailing list