2017-10-04 21:38 GMT+02:00 Esteban A. Maringolo <[email protected]>:
> 2017-10-04 6:46 GMT-03:00 Denis Kudriashov <[email protected]>: > >> 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? > 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. > > 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 > > > >
