Gleb,It seems you miss the point here: not only logger should be lazy, but all calls to logger's methods:Hmm, nope. Let me change the debug signature from debug(message : String) : Unitto debug(message : => String) : Unitor (that is substantially the same) // annotations and macros will be in Scala very soon :-Pand all the calls remain the same. So the example shows, that the default lazyness saves me from typing word "lazy" a whole two times! It doesn't look for me as "irrefutable advantage", sorry ;-) Best regards, Nick. |
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe