[squeak-dev] Re: printing literals exactly (was isSelfEvaluating)
cputney at wiresong.ca
Sat Oct 31 20:21:53 UTC 2009
On 31-Oct-09, at 9:05 AM, Nicolas Cellier wrote:
> Hehe, I've got a plan.
> Use storeOn: rather than printOn: to produce the decompileString.
> It will be the same for all literals, but Float in which I will
> override storeOn:
> My plan is to print exactly if isFinite, or invoke a message pattern
> otherwise (Float nan, Float infinity, Float infinity negated).
> Note that these exceptional values are not literals (I already fixed
And to generalize a bit more, the classes that were implementing
#isSelfEvaluating could instead override #storeOn: to send #printOn:,
and get a "prettier" result than the #storeOn: implemented in Object.
More information about the Squeak-dev