<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: I Didn&#8217;t Order That, So Why Is It On My Bill, Episode 1</title>
	<atom:link href="http://ridiculousfish.com/blog/archives/2009/06/22/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://ridiculousfish.com/blog/archives/2009/06/22/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1/</link>
	<description>serious code</description>
	<lastBuildDate>Sat, 31 Jul 2010 18:07:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Xo Wang</title>
		<link>http://ridiculousfish.com/blog/archives/2009/06/22/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1/comment-page-1/#comment-997</link>
		<dc:creator>Xo Wang</dc:creator>
		<pubDate>Tue, 23 Mar 2010 23:17:09 +0000</pubDate>
		<guid isPermaLink="false">http://pammon.webfactional.com/blog/?p=106#comment-997</guid>
		<description>This blog is fantastic! I&#039;m student who has been using C++ for about 3 years now, and I&#039;ve noticed that what I&#039;ve learned with each project were features and quirks of C++, and how or why *not* to use them. This little column introduced me to a new facet of the language—features I don&#039;t need but still pay for.</description>
		<content:encoded><![CDATA[<p>This blog is fantastic! I&#8217;m student who has been using C++ for about 3 years now, and I&#8217;ve noticed that what I&#8217;ve learned with each project were features and quirks of C++, and how or why *not* to use them. This little column introduced me to a new facet of the language—features I don&#8217;t need but still pay for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil</title>
		<link>http://ridiculousfish.com/blog/archives/2009/06/22/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1/comment-page-1/#comment-876</link>
		<dc:creator>Phil</dc:creator>
		<pubDate>Wed, 21 Oct 2009 22:34:12 +0000</pubDate>
		<guid isPermaLink="false">http://pammon.webfactional.com/blog/?p=106#comment-876</guid>
		<description>rmn: This is a runtime cost. Consider a program that is run very often, and takes very little time. The linking can come to be the dominant term in total execution time. Consider also programs that can load dynamic libraries as plugins, or interpreters for some other language with a foreign function interface. We pay the cost at each load there, too.</description>
		<content:encoded><![CDATA[<p>rmn: This is a runtime cost. Consider a program that is run very often, and takes very little time. The linking can come to be the dominant term in total execution time. Consider also programs that can load dynamic libraries as plugins, or interpreters for some other language with a foreign function interface. We pay the cost at each load there, too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rmn</title>
		<link>http://ridiculousfish.com/blog/archives/2009/06/22/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1/comment-page-1/#comment-860</link>
		<dc:creator>rmn</dc:creator>
		<pubDate>Thu, 17 Sep 2009 19:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://pammon.webfactional.com/blog/?p=106#comment-860</guid>
		<description>Well, you said you were going to say how we&#039;re paying for this at runtime - but you haven&#039;t. I wouldn&#039;t consider the time it takes to load shared libraries as &quot;runtime&quot; since, well, it is not the run time of your own code. For the same reasoning you could say that context switches are part of your runtime and are somehow related to C++, but that would not make a valid point imo.
Nice read though.</description>
		<content:encoded><![CDATA[<p>Well, you said you were going to say how we&#8217;re paying for this at runtime &#8211; but you haven&#8217;t. I wouldn&#8217;t consider the time it takes to load shared libraries as &#8220;runtime&#8221; since, well, it is not the run time of your own code. For the same reasoning you could say that context switches are part of your runtime and are somehow related to C++, but that would not make a valid point imo.<br />
Nice read though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre Lebeaupin</title>
		<link>http://ridiculousfish.com/blog/archives/2009/06/22/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1/comment-page-1/#comment-805</link>
		<dc:creator>Pierre Lebeaupin</dc:creator>
		<pubDate>Mon, 29 Jun 2009 12:19:42 +0000</pubDate>
		<guid isPermaLink="false">http://pammon.webfactional.com/blog/?p=106#comment-805</guid>
		<description>(I was not answering &quot;Someone&quot; with my post, btw.)</description>
		<content:encoded><![CDATA[<p>(I was not answering &#8220;Someone&#8221; with my post, btw.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre Lebeaupin</title>
		<link>http://ridiculousfish.com/blog/archives/2009/06/22/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1/comment-page-1/#comment-804</link>
		<dc:creator>Pierre Lebeaupin</dc:creator>
		<pubDate>Mon, 29 Jun 2009 12:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://pammon.webfactional.com/blog/?p=106#comment-804</guid>
		<description>Well, if you read about symbol resolution in the Mach-O runtime (or for that matter, ELF), you realise that even in C some work needs to be done to ensure pointers to the same function always compare equal, e.g. one consequence is that a function from a dylib cannot be resolved lazily in a module where its address is taken (the address of the stub function cannot be taken as then it wouldn&#039;t compare equal to the function pointer address taken from within the dylib, or one taken from another module). Some time after reading in these docs the care that needs to be taken to ensure that, I was thinking about how to implement a feature (in code that needs to be so cross-platform it&#039;s not even funny - think embedded RT OSes), and while it could make sense for it to rely on function pointer equality (long story), I thought &quot;Hmm, I read about how Mach-O does this, it&#039;s not trivial, perhaps other systems screw this up...&quot; and decided the feature would query the function instead of comparing the function pointers (the feature has yet to be implemented, though). It&#039;s only later that I learned that, on Windows, not only can two function pointers to the same function, but taken from different sides of a DLL boundary, compare different (learned from experimenting with a test case), but in fact two different functions can end up in the same address (and have function pointers compare equal) if they do the same thing (learned from the Old New Thing, of course, and confirmed experimentally)! Of course, the latter (and perhaps the former) can be prevented if you specify some &quot;OMG be super respectful of all C semantics&quot; flag, but how can you trust everyone who ever compiles your code to always set such a flag?...</description>
		<content:encoded><![CDATA[<p>Well, if you read about symbol resolution in the Mach-O runtime (or for that matter, ELF), you realise that even in C some work needs to be done to ensure pointers to the same function always compare equal, e.g. one consequence is that a function from a dylib cannot be resolved lazily in a module where its address is taken (the address of the stub function cannot be taken as then it wouldn&#8217;t compare equal to the function pointer address taken from within the dylib, or one taken from another module). Some time after reading in these docs the care that needs to be taken to ensure that, I was thinking about how to implement a feature (in code that needs to be so cross-platform it&#8217;s not even funny &#8211; think embedded RT OSes), and while it could make sense for it to rely on function pointer equality (long story), I thought &#8220;Hmm, I read about how Mach-O does this, it&#8217;s not trivial, perhaps other systems screw this up&#8230;&#8221; and decided the feature would query the function instead of comparing the function pointers (the feature has yet to be implemented, though). It&#8217;s only later that I learned that, on Windows, not only can two function pointers to the same function, but taken from different sides of a DLL boundary, compare different (learned from experimenting with a test case), but in fact two different functions can end up in the same address (and have function pointers compare equal) if they do the same thing (learned from the Old New Thing, of course, and confirmed experimentally)! Of course, the latter (and perhaps the former) can be prevented if you specify some &#8220;OMG be super respectful of all C semantics&#8221; flag, but how can you trust everyone who ever compiles your code to always set such a flag?&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Someone</title>
		<link>http://ridiculousfish.com/blog/archives/2009/06/22/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1/comment-page-1/#comment-796</link>
		<dc:creator>Someone</dc:creator>
		<pubDate>Tue, 23 Jun 2009 19:26:15 +0000</pubDate>
		<guid isPermaLink="false">http://pammon.webfactional.com/blog/?p=106#comment-796</guid>
		<description>I do not understand why -fvisibility-inlines-hidden would have to break &quot;An inline function with external linkage shall have the same address in all translation units&quot;. Couldn&#039;t a compiler:
- in code that never takes the address of a function f:
    - call an invisible copy of an inline function
    - not generate a copy with external linkage
- in code that does takes the address of f:
    - generate a copy with external linkage
    - use that copy&#039;s address as address of f (so that the linker has to do work to guarantee that all translation units get the same value for its address)

Technically, that would be in conflict with the standard, but how could a conforming program tell? If not, what is wrong?</description>
		<content:encoded><![CDATA[<p>I do not understand why -fvisibility-inlines-hidden would have to break &#8220;An inline function with external linkage shall have the same address in all translation units&#8221;. Couldn&#8217;t a compiler:<br />
- in code that never takes the address of a function f:<br />
    &#8211; call an invisible copy of an inline function<br />
    &#8211; not generate a copy with external linkage<br />
- in code that does takes the address of f:<br />
    &#8211; generate a copy with external linkage<br />
    &#8211; use that copy&#8217;s address as address of f (so that the linker has to do work to guarantee that all translation units get the same value for its address)</p>
<p>Technically, that would be in conflict with the standard, but how could a conforming program tell? If not, what is wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DogCow</title>
		<link>http://ridiculousfish.com/blog/archives/2009/06/22/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1/comment-page-1/#comment-795</link>
		<dc:creator>DogCow</dc:creator>
		<pubDate>Tue, 23 Jun 2009 15:18:50 +0000</pubDate>
		<guid isPermaLink="false">http://pammon.webfactional.com/blog/?p=106#comment-795</guid>
		<description>Glad to see you&#039;re updating the blog again!</description>
		<content:encoded><![CDATA[<p>Glad to see you&#8217;re updating the blog again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ross</title>
		<link>http://ridiculousfish.com/blog/archives/2009/06/22/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1/comment-page-1/#comment-793</link>
		<dc:creator>Ross</dc:creator>
		<pubDate>Tue, 23 Jun 2009 14:02:18 +0000</pubDate>
		<guid isPermaLink="false">http://pammon.webfactional.com/blog/?p=106#comment-793</guid>
		<description>(i just wanted to see what pi is so far, because i read the &#039;what&#039;s this&#039; link after reading the article.)

good article! can&#039;t wait for the next ones..</description>
		<content:encoded><![CDATA[<p>(i just wanted to see what pi is so far, because i read the &#8216;what&#8217;s this&#8217; link after reading the article.)</p>
<p>good article! can&#8217;t wait for the next ones..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david</title>
		<link>http://ridiculousfish.com/blog/archives/2009/06/22/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1/comment-page-1/#comment-788</link>
		<dc:creator>david</dc:creator>
		<pubDate>Tue, 23 Jun 2009 11:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://pammon.webfactional.com/blog/?p=106#comment-788</guid>
		<description>great post, concise and interesting. however, who is exporting vector::* anyway? does this happen in any dylibs shipped in OSX?</description>
		<content:encoded><![CDATA[<p>great post, concise and interesting. however, who is exporting vector::* anyway? does this happen in any dylibs shipped in OSX?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Don Hersey</title>
		<link>http://ridiculousfish.com/blog/archives/2009/06/22/i-didnt-order-that-so-why-is-it-on-my-bill-episode-1/comment-page-1/#comment-787</link>
		<dc:creator>Don Hersey</dc:creator>
		<pubDate>Tue, 23 Jun 2009 09:47:58 +0000</pubDate>
		<guid isPermaLink="false">http://pammon.webfactional.com/blog/?p=106#comment-787</guid>
		<description>I haven&#039;t programmed in awhile, so go easy on me, I&#039;ve been busy with other things, unfortunately.  Is the intent here to protect memory-mapped I/O (ie volatile paramed fns)?  Or if the fn has something equivalent to a &#039;how many times have I been called&#039; counter?  What, in your opinion, is the motivation for having things this way?</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t programmed in awhile, so go easy on me, I&#8217;ve been busy with other things, unfortunately.  Is the intent here to protect memory-mapped I/O (ie volatile paramed fns)?  Or if the fn has something equivalent to a &#8216;how many times have I been called&#8217; counter?  What, in your opinion, is the motivation for having things this way?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
