2017-10-04 6:46 GMT-03:00 Denis Kudriashov <dionisiydk@gmail.com>:
Hi Igor.

Did you see that we have now #asMethodConstant?

DateAndTime now asMethodConst

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?

Dolphin had the ##() syntax, which basically creates a method constant, but it is evaluated right away.

So you could write the seconds in a day as ##(60*60*24), or, of course, any more complex expression. But the difference is that it is resolved at compile time.

However I don't see how this relates with the String interpolation :)��

Esteban A. Maringolo


��