2017-01-26 23:28 GMT+01:00 Chris Cunningham <cunningham.cb@gmail.com>:
On Thu, Jan 26, 2017 at 2:02 PM, stepharong <stepharong@free.fr> wrote:
On Thu, 26 Jan 2017 20:38:49 +0100, Torsten Bergmann <astares@gmx.de> wrote:
...
Instead it is sent to an object that afterwards is a constant within a method (so it will not be evaluated later at runtime again) so IMHO #asMethodConstant instead of #asMethodConst would be better.
I do not understand any of them.
In other words, this is creating a constant inside the method (#asMethodConstant) instead of making the method return a constant (which would be your #asConstantMethod). If I have that right. In any case, not having the contracted 'Const' would be nice.
Ok, this is done 19611 <https://pharo.fogbugz.com/f/cases/19611/rename-asMethodConst-into-asMethodCo...> . Interesting to mention that while #asMethodConstant is defined on Object it also works well when sent to block. In that case BlockNode is replaced by result as literal