[Pharo-dev] String Interpolation

Esteban A. Maringolo emaringolo at gmail.com
Wed Oct 4 16:01:52 EDT 2017

2017-10-04 16:49 GMT-03:00 Denis Kudriashov <dionisiydk at gmail.com>:
> 2017-10-04 21:38 GMT+02:00 Esteban A. Maringolo <emaringolo at gmail.com>:

>>> It is not compiled time but behaviour is very close to it.
>>> The trick is that first time execution will replace full expression with
>>> the result as literal (the receiver of #asMethodConst). So at second time it
>>> will be just literal reading.

>> It is weird that a regular message send makes the returned value a method
>> constant.
>> How is that cleaned up? Do I have to search for all the methods that
>> contain such message send?

> What the problem? This message is a tool. You use it when you need it. When
> you modify the method the value is cleaned.
> Nice thing is that it not requires special syntax. And you can debug
> expression as normal part of method.

I don't see any problem, I just said "weird".

It's a "special return" message send. A trick of sorts, no different
than #doesNotUnderstand: or other special selectors.


Esteban A. Maringolo

More information about the Pharo-dev mailing list