[squeak-dev] isSelfEvaluating

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sat Oct 31 14:31:49 UTC 2009


2009/10/31 Stéphane Rollandin <lecteur at zogotounga.net>:
>>> If the meaning of #isLiteral is to indicate that what is printed can be
>>> read back (i.e. will be correctly parsed) then I think it is a very useful
>>> message that we should keep.
>>
>> #isLiteral mainly indicates which objects can be created at compile time.
>> They are literally inserted in the compiled method. This must match the
>> syntax definition of Squeak. There is no question about not keeping it.
>
> now I'm confused. are all objects anwering true to #isLiteral also have a
> printed form that can be read back ? should they ?
>
> Stef
>

I think this is used as a feature at least in Decompiler.

But can they all be read back ?
Float can't always with the current implementation (they don't print exactly).

(Compiler evaluate: Float halfPi printString) = Float halfPi

Nicolas



More information about the Squeak-dev mailing list