<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#cccccc" text="#000000">
Gleb,<br>
<br>
<blockquote cite="mider1l01$ogv$1@sea.gmane.org" type="cite">It seems
you miss the point here: not only logger should be lazy, but all calls
to logger's methods:
  <br>
  <br>
logger.debug(formatLongMessage(args)); // formatLongMessage should not
  <br>
                                       // waste CPU cycles if debug
  <br>
                                       // logging is off
  <br>
</blockquote>
Hmm, nope. Let me change the debug signature from<br>
<blockquote><tt>debug(message : String) : Unit<br>
  </tt></blockquote>
to<br>
<blockquote><tt>debug(message : =&gt; String) : Unit</tt><br>
</blockquote>
or (that is substantially the same)<br>
<blockquote><tt> // annotations and macros will be in Scala very soon
:-P</tt><br>
  <tt>debug(@lazy message : String) : Unit</tt><br>
</blockquote>
and 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 ;-)<br>
<br>
Best regards,<br>
Nick.<br>
</body>
</html>