<?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: The hidden cost of C++</title>
	<atom:link href="http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/</link>
	<description>Game Development as seen through the Blum Filter</description>
	<lastBuildDate>Tue, 31 Aug 2010 01:01:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Salvatore Aline</title>
		<link>http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/comment-page-1/#comment-830</link>
		<dc:creator>Salvatore Aline</dc:creator>
		<pubDate>Tue, 31 Aug 2010 01:01:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.rachelslabnotes.com/?p=20#comment-830</guid>
		<description>&lt;p&gt;Sick of obtaining low numbers of useless visitors to your website? Well i wish to share with you a fresh underground tactic that makes myself $900  on a daily basis on 100% AUTOPILOT. I could be here all day and going into detail but why dont you merely check their site out? There is a excellent video that explains everything. So if your seriously interested in producing effortless hard cash this is the site for you. &lt;a href=&quot;http://tiny.cc/p7mq4&quot; rel=&quot;nofollow&quot;&gt;Auto Traffic Avalanche&lt;/a&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Sick of obtaining low numbers of useless visitors to your website? Well i wish to share with you a fresh underground tactic that makes myself $900  on a daily basis on 100% AUTOPILOT. I could be here all day and going into detail but why dont you merely check their site out? There is a excellent video that explains everything. So if your seriously interested in producing effortless hard cash this is the site for you. <a href="http://tiny.cc/p7mq4" rel="nofollow">Auto Traffic Avalanche</a></p>]]></content:encoded>
	</item>
	<item>
		<title>By: alteplack</title>
		<link>http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/comment-page-1/#comment-488</link>
		<dc:creator>alteplack</dc:creator>
		<pubDate>Thu, 29 Jul 2010 09:05:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.rachelslabnotes.com/?p=20#comment-488</guid>
		<description>&lt;p&gt;Проект &lt;a href=&quot;http://moskow-sun.ru&quot; rel=&quot;nofollow&quot;&gt;Студия загара &lt;/a&gt; является эксклюзивным порталом в отрасли загара. Портал является структурированной системой объединяющей студии загара, и предоставляющей объективную оценку работы салонов. Объективность оценок в первую очередь достигается с помощью ваших отзывов и оценок студий загара.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Проект <a href="http://moskow-sun.ru" rel="nofollow">Студия загара </a> является эксклюзивным порталом в отрасли загара. Портал является структурированной системой объединяющей студии загара, и предоставляющей объективную оценку работы салонов. Объективность оценок в первую очередь достигается с помощью ваших отзывов и оценок студий загара.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: labmistress</title>
		<link>http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/comment-page-1/#comment-280</link>
		<dc:creator>labmistress</dc:creator>
		<pubDate>Tue, 08 Jun 2010 03:37:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.rachelslabnotes.com/?p=20#comment-280</guid>
		<description>&lt;p&gt;But the cost &lt;em&gt;at the call site&lt;/em&gt; is predictable in C, while it isn&#039;t in C++. Implicit code generation only happens in C++, and it&#039;s a big problem. (Even Stroustroup agrees on that - read his comments on implicit casts and constructors)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>But the cost <em>at the call site</em> is predictable in C, while it isn&#8217;t in C++. Implicit code generation only happens in C++, and it&#8217;s a big problem. (Even Stroustroup agrees on that &#8211; read his comments on implicit casts and constructors)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Guy</title>
		<link>http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/comment-page-1/#comment-256</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Sun, 30 May 2010 18:24:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.rachelslabnotes.com/?p=20#comment-256</guid>
		<description>&lt;p&gt;Programming is hard.  In any language.  C is terrible.&lt;/p&gt;

&lt;p&gt;a = func(b,c)&lt;/p&gt;

&lt;p&gt;In any large C project I&#039;ve seen func() will call f(), g(), h(), m() which in turn call F(), G(), L(), Q().  Now Q() locks a mutex.  L() opens a file for logging.  G() uses a linked list structure written by some co-op two years ago that is not thread safe (but has worked fine till today).  F() uses some obscure macros and has security issues due to the use of strncpy or sprintf.&lt;/p&gt;

&lt;p&gt;Now, what is the cost of func(b, c)?&lt;/p&gt;

&lt;p&gt;C++ is far for perfect.  In fact it is terrible just like C.  But it has some solutions for some of the issues in C.  It allows OOP (which a lot of C programs end up emulating in awkward ways).  It has good robust libraries (stl, boost) and it interfaces in a nicer way to existing object oriented frameworks.  It is fast.&lt;/p&gt;

&lt;p&gt;A lot of people hate C++ and usually pick up on some esoteric feature.  A lot of people don&#039;t get it.  A lot of C programmers forget how long it took them to get C.  Programming is hard.  Life is hard and then you die.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Programming is hard.  In any language.  C is terrible.</p>

<p>a = func(b,c)</p>

<p>In any large C project I&#8217;ve seen func() will call f(), g(), h(), m() which in turn call F(), G(), L(), Q().  Now Q() locks a mutex.  L() opens a file for logging.  G() uses a linked list structure written by some co-op two years ago that is not thread safe (but has worked fine till today).  F() uses some obscure macros and has security issues due to the use of strncpy or sprintf.</p>

<p>Now, what is the cost of func(b, c)?</p>

<p>C++ is far for perfect.  In fact it is terrible just like C.  But it has some solutions for some of the issues in C.  It allows OOP (which a lot of C programs end up emulating in awkward ways).  It has good robust libraries (stl, boost) and it interfaces in a nicer way to existing object oriented frameworks.  It is fast.</p>

<p>A lot of people hate C++ and usually pick up on some esoteric feature.  A lot of people don&#8217;t get it.  A lot of C programmers forget how long it took them to get C.  Programming is hard.  Life is hard and then you die.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Advantages of C over C++ &#171; Jasper Blog</title>
		<link>http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/comment-page-1/#comment-102</link>
		<dc:creator>Advantages of C over C++ &#171; Jasper Blog</dc:creator>
		<pubDate>Sun, 10 Jan 2010 09:54:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.rachelslabnotes.com/?p=20#comment-102</guid>
		<description>&lt;p&gt;[...] hidden cost of C++ or Defective [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] hidden cost of C++ or Defective [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: There are never enough render engines.. &#124; Rachels Lab Notes</title>
		<link>http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/comment-page-1/#comment-60</link>
		<dc:creator>There are never enough render engines.. &#124; Rachels Lab Notes</dc:creator>
		<pubDate>Sun, 15 Nov 2009 00:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.rachelslabnotes.com/?p=20#comment-60</guid>
		<description>&lt;p&gt;[...] my post on the hidden cost of C++, Vince suggested I go write a small game in C, see how I like [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] my post on the hidden cost of C++, Vince suggested I go write a small game in C, see how I like [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: ginee</title>
		<link>http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/comment-page-1/#comment-29</link>
		<dc:creator>ginee</dc:creator>
		<pubDate>Wed, 21 Oct 2009 16:55:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.rachelslabnotes.com/?p=20#comment-29</guid>
		<description>&lt;p&gt;@labmistress&lt;/p&gt;

&lt;p&gt;Quoting you: &quot;It’s not about C++ being ‘easy’. I write code in assembly, Python, Haskell, Erlang,… so I think I can deal with ‘not easy’. It’s about the horrible cost creating a mental model of your program creates.&quot;&lt;/p&gt;

&lt;p&gt;I have a feeling that you are then dealing with improperly trained programmers. Nobody serious in the industry has problems with a complicated mental model. Complicated != crap, complicated = complicated. And you can argue about writing in language X that are &quot;complicated&quot; all you want.&lt;/p&gt;

&lt;p&gt;These languages however ARE designed to be extremely high abstraction layers that take away the cost of dealing with the hardware where you have to. And at the high level, properly done C++ puts to shame everybody right now.&lt;/p&gt;

&lt;p&gt;As for the rest, as a contributor to very well known compilers out there, I know what I am talking about. Using C++ has more to do with multilevel access than anything else. Speed is a welcomed side - effect when done right, but then again, you have to actually &lt;em&gt;know&lt;/em&gt; how to program in C++, which takes several years to master. It is &lt;em&gt;not&lt;/em&gt; your &quot;for dummies&quot; language. It is meant to be used where the others fail and that should kind of suggest of why you don&#039;t have a worthy successor &lt;em&gt;yet&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;This is not a contest of &quot;look I can write code in a turing tarpit, does that make me look smart?&quot;. So far, you have &lt;em&gt;no&lt;/em&gt; reak &lt;em&gt;immediate&lt;/em&gt; alternative to C++ despite the best of intentions. When I will be having a language that supports a system similar to templates and what &lt;em&gt;actually&lt;/em&gt; can be done with it, we will talk about it. So far, Haskell&#039;s &quot;Template Haskell&quot; has proved to be worthless. But guess what ... it tries to do what C++ does!&lt;/p&gt;

&lt;p&gt;Use what you have to, when you have to.&lt;/p&gt;

&lt;p&gt;Just my 2c.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@labmistress</p>

<p>Quoting you: &#8220;It’s not about C++ being ‘easy’. I write code in assembly, Python, Haskell, Erlang,… so I think I can deal with ‘not easy’. It’s about the horrible cost creating a mental model of your program creates.&#8221;</p>

<p>I have a feeling that you are then dealing with improperly trained programmers. Nobody serious in the industry has problems with a complicated mental model. Complicated != crap, complicated = complicated. And you can argue about writing in language X that are &#8220;complicated&#8221; all you want.</p>

<p>These languages however ARE designed to be extremely high abstraction layers that take away the cost of dealing with the hardware where you have to. And at the high level, properly done C++ puts to shame everybody right now.</p>

<p>As for the rest, as a contributor to very well known compilers out there, I know what I am talking about. Using C++ has more to do with multilevel access than anything else. Speed is a welcomed side &#8211; effect when done right, but then again, you have to actually <em>know</em> how to program in C++, which takes several years to master. It is <em>not</em> your &#8220;for dummies&#8221; language. It is meant to be used where the others fail and that should kind of suggest of why you don&#8217;t have a worthy successor <em>yet</em>.</p>

<p>This is not a contest of &#8220;look I can write code in a turing tarpit, does that make me look smart?&#8221;. So far, you have <em>no</em> reak <em>immediate</em> alternative to C++ despite the best of intentions. When I will be having a language that supports a system similar to templates and what <em>actually</em> can be done with it, we will talk about it. So far, Haskell&#8217;s &#8220;Template Haskell&#8221; has proved to be worthless. But guess what &#8230; it tries to do what C++ does!</p>

<p>Use what you have to, when you have to.</p>

<p>Just my 2c.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: groby</title>
		<link>http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/comment-page-1/#comment-28</link>
		<dc:creator>groby</dc:creator>
		<pubDate>Wed, 21 Oct 2009 16:38:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.rachelslabnotes.com/?p=20#comment-28</guid>
		<description>&lt;p&gt;@Robert: It&#039;s interesting that it&#039;s a fighting game that was written in C - another C holdout I got to work with was also a fighting game team. I&#039;d figure that the absolute need to reach 60fps makes them reluctant to move on - although they did move on, at some point.&lt;/p&gt;

&lt;p&gt;And I don&#039;t think AAA games are abandoning C++ within the next 5 years. We might - possibly - see VMs making inroads for scripting purposes, but even that is doubtful given the inertia of our industry.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Robert: It&#8217;s interesting that it&#8217;s a fighting game that was written in C &#8211; another C holdout I got to work with was also a fighting game team. I&#8217;d figure that the absolute need to reach 60fps makes them reluctant to move on &#8211; although they did move on, at some point.</p>

<p>And I don&#8217;t think AAA games are abandoning C++ within the next 5 years. We might &#8211; possibly &#8211; see VMs making inroads for scripting purposes, but even that is doubtful given the inertia of our industry.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: groby</title>
		<link>http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/comment-page-1/#comment-27</link>
		<dc:creator>groby</dc:creator>
		<pubDate>Wed, 21 Oct 2009 16:35:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.rachelslabnotes.com/?p=20#comment-27</guid>
		<description>&lt;p&gt;@vince: Oh, we&#039;re sticking with C++ for the time being, too. Which is understandable - I wouldn&#039;t gamble a $25 million project on some gal&#039;s hunch that something else could work better ;)&lt;/p&gt;

&lt;p&gt;Thankfully, here I can take a more exploratory stance. And by simply posting my (moderate, I think) objections to C++ and having a fantastic follow-up discussion, I get to clarify my thoughts looking for the elusive &#039;better choice&#039;&lt;/p&gt;

&lt;p&gt;Middleware could certainly be dealt with via C++ ABI compatibility/FFI. Tools are an issue - the only languages that can compete on a tools level right now are C# and Java. As I said, my hope is on LLVM changing this.&lt;/p&gt;

&lt;p&gt;Doing this experiment &lt;em&gt;would&lt;/em&gt; be tempting. Just need to find the time... In case it does happen, it would in all likelihood be developed in the HLL first, dropping down to the lower level if performance indicates it&#039;s necessary. Probably in a restricted VM, just so I actually feel some pressure to drop down - small games are not exactly performance hogs.&lt;/p&gt;

&lt;p&gt;The Löve code-base also might be interesting, since it is (IIRC) written entirely in C.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@vince: Oh, we&#8217;re sticking with C++ for the time being, too. Which is understandable &#8211; I wouldn&#8217;t gamble a $25 million project on some gal&#8217;s hunch that something else could work better ;)</p>

<p>Thankfully, here I can take a more exploratory stance. And by simply posting my (moderate, I think) objections to C++ and having a fantastic follow-up discussion, I get to clarify my thoughts looking for the elusive &#8216;better choice&#8217;</p>

<p>Middleware could certainly be dealt with via C++ ABI compatibility/FFI. Tools are an issue &#8211; the only languages that can compete on a tools level right now are C# and Java. As I said, my hope is on LLVM changing this.</p>

<p>Doing this experiment <em>would</em> be tempting. Just need to find the time&#8230; In case it does happen, it would in all likelihood be developed in the HLL first, dropping down to the lower level if performance indicates it&#8217;s necessary. Probably in a restricted VM, just so I actually feel some pressure to drop down &#8211; small games are not exactly performance hogs.</p>

<p>The Löve code-base also might be interesting, since it is (IIRC) written entirely in C.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://www.rachelslabnotes.com/2009/10/the-hidden-cost-of-c/comment-page-1/#comment-26</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Wed, 21 Oct 2009 16:27:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.rachelslabnotes.com/?p=20#comment-26</guid>
		<description>&lt;p&gt;Just jumping in here. I use C++ at work (games) everyday, and have over the years begun to get bored with its complexity. When I&#039;m in the &quot;spot&quot; I can write great performant code without issues, but when on slow day...&lt;/p&gt;

&lt;p&gt;Anyways unfortunately neither D or C# are really up to the task yet. But yes you can use C. Here in Japan there are still plenty of C shops, however most work on smaller portable games, but I can say that Virtual Fighter 5 was written in C, not C++. That was epic. Because the glue code was C.&lt;/p&gt;

&lt;p&gt;In my spare time, I have actually been writting game components in straight C, and it&#039;s trivial to write physics, graphics, IO, network, persistency, etc. in plain C. The real issue is the glue (gameplay) code. Writting glue code in C is crazy, but writting glue code in C++ is about as cumbersome as C is crazy, so I&#039;ve been using Lua (Jit) for glue, which works great when combined with a good memory allocator.&lt;/p&gt;

&lt;p&gt;Anyways I&#039;m still keeping my hopes that something simpler and more concise comes around to replace our reliance C++ within the next 5 years!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Just jumping in here. I use C++ at work (games) everyday, and have over the years begun to get bored with its complexity. When I&#8217;m in the &#8220;spot&#8221; I can write great performant code without issues, but when on slow day&#8230;</p>

<p>Anyways unfortunately neither D or C# are really up to the task yet. But yes you can use C. Here in Japan there are still plenty of C shops, however most work on smaller portable games, but I can say that Virtual Fighter 5 was written in C, not C++. That was epic. Because the glue code was C.</p>

<p>In my spare time, I have actually been writting game components in straight C, and it&#8217;s trivial to write physics, graphics, IO, network, persistency, etc. in plain C. The real issue is the glue (gameplay) code. Writting glue code in C is crazy, but writting glue code in C++ is about as cumbersome as C is crazy, so I&#8217;ve been using Lua (Jit) for glue, which works great when combined with a good memory allocator.</p>

<p>Anyways I&#8217;m still keeping my hopes that something simpler and more concise comes around to replace our reliance C++ within the next 5 years!</p>]]></content:encoded>
	</item>
</channel>
</rss>
