<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: You Lazy Thunk!</title>
	<atom:link href="http://blog.tmorris.net/you-lazy-thunk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tmorris.net/you-lazy-thunk/</link>
	<description>The weblog of Tony Morris</description>
	<pubDate>Sat, 19 May 2012 03:16:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Tony Morris</title>
		<link>http://blog.tmorris.net/you-lazy-thunk/#comment-1012</link>
		<dc:creator>Tony Morris</dc:creator>
		<pubDate>Fri, 18 May 2007 01:19:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/you-lazy-thunk/#comment-1012</guid>
		<description>Thanks Chad, you're right</description>
		<content:encoded><![CDATA[<p>Thanks Chad, you&#8217;re right</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad Scherrer</title>
		<link>http://blog.tmorris.net/you-lazy-thunk/#comment-1011</link>
		<dc:creator>Chad Scherrer</dc:creator>
		<pubDate>Wed, 16 May 2007 22:37:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/you-lazy-thunk/#comment-1011</guid>
		<description>I think you mean "normal form", without the "weak head". WHNF evaluates a data type to its top-level constructor, so a list to either [] or (_:_), but does not evaluate the elements of the list. Normal form forces evaluation of all the elements.</description>
		<content:encoded><![CDATA[<p>I think you mean &#8220;normal form&#8221;, without the &#8220;weak head&#8221;. WHNF evaluates a data type to its top-level constructor, so a list to either [] or (_:_), but does not evaluate the elements of the list. Normal form forces evaluation of all the elements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky Clarkson</title>
		<link>http://blog.tmorris.net/you-lazy-thunk/#comment-1010</link>
		<dc:creator>Ricky Clarkson</dc:creator>
		<pubDate>Wed, 16 May 2007 05:17:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tmorris.net/you-lazy-thunk/#comment-1010</guid>
		<description>It should be noted that the runtimes and/or compilers are generally free to optimise two calls to f() to one call, as long as they preserve side effects and results.

Usually, side effects are the real reason why calling f() twice is bad - the writer you mention probably knows this, but has still got efficiency bouncing around his head.

I'm guessing that the article you read was about macro expansions, in which case it is definitely problematic to evaluate an argument multiple times in a macro expansion, if evaluating the argument has side effects.  Macros that evaluate an argument multiple times, and hence leak their implementation details, should be annotated as such - typical C style is to make them uppercase - encouraging caution in calling.</description>
		<content:encoded><![CDATA[<p>It should be noted that the runtimes and/or compilers are generally free to optimise two calls to f() to one call, as long as they preserve side effects and results.</p>
<p>Usually, side effects are the real reason why calling f() twice is bad - the writer you mention probably knows this, but has still got efficiency bouncing around his head.</p>
<p>I&#8217;m guessing that the article you read was about macro expansions, in which case it is definitely problematic to evaluate an argument multiple times in a macro expansion, if evaluating the argument has side effects.  Macros that evaluate an argument multiple times, and hence leak their implementation details, should be annotated as such - typical C style is to make them uppercase - encouraging caution in calling.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

