<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi all,</p>
<p><br>
</p>
<p>I just evaluated the following line and was surprised by the result:</p>
<p><br>
</p>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<p><span>Compiler evaluate: '' for: 42.</span></p>
</blockquote>
<p><span><br>
</span></p>
<p>The answer was nil, whereas I rather would have expected <span><strike>the answer to life the universe and everything</strike> 42, as it is the case for full methods compiled on an object. What do you think about this, which should be the right output?</span></p>
<p><span><br>
</span></p>
<p><span>I was even more surprised after taking a look into the relevant Parser implementation, which is #<span>statements:innerBlock:blockNode:. Actually, the 'inner' argument's sole purpose is to use 'nil' instead of 'self' as a return value if there are
 zero statements. If we would not like to have this extra rule for doIt snippets, we would only have to change #<span>method:context:[encoder:] and pass 'false' instead of 'doit' to #<span>statements:innerBlock:.</span></span></span></span></p>
<p><span><span><span><span><br>
</span></span></span></span></p>
<p><span><span><span><span>I'm probably missing some logical consequences of the syntactic concept of blocks, methods, and doits, so I would like to hear your thoughts on this.</span></span></span></span></p>
<p><span><span><span><span><br>
</span></span></span></span></p>
<p><span><span><span><span>Best,</span></span></span></span></p>
<p><span><span><span><span>Christoph</span></span></span></span></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
</body>
</html>