<story><title>On comparing languages, C++ and Go</title><url>http://blog.grok.se/2013/10/on-comparing-languages-c-and-go/</url></story><parent_chain><item><author>tptacek</author><text>I&amp;#x27;ve been following this whole business card raytracer story and wonder if people might be missing the forest for the trees.&lt;p&gt;It would be a little nutty to suggest that Golang 1.1 is going to give optimized C code a run for its money. Nobody could seriously be suggesting that.&lt;p&gt;What is surprising is that the naive expression of an &amp;quot;interesting&amp;quot; compute-bound program in both languages are as close as they are.&lt;p&gt;Most C&amp;#x2F;C++ code --- the overwhelming majority, in fact --- is not especially performance sensitive. It often happens to have performance and memory footprint demands that exceed the capabilities of naive Python, but that fit squarely into the capabilities of naive C.&lt;p&gt;The expectation of many C programmers, myself included, is that there&amp;#x27;d still be marked difference between Go and C for this kind of code. But it appears that there may not be.&lt;p&gt;This doesn&amp;#x27;t suggest that I&amp;#x27;d want to try to fit Golang into a kernel module and write a driver with it, but it does further suggest that maybe I&amp;#x27;d be a little silly to write my next &amp;quot;must be faster than Python&amp;quot; program in C.</text></item></parent_chain><comment><author>npalli</author><text>That&amp;#x27;s interesting. I had the opposite reaction regarding Golang capabilities while following this saga. Not sure how &amp;#x27;idiomatic&amp;#x27; the Golang code is, at first glance it just seems less expressive (more lines of code) than either c++ or java!. I didn&amp;#x27;t think that was possible.&lt;p&gt;So whenever people talk about expressiveness of Golang it just seems like a design gone bad. The designers wanted a programming language with the expressiveness of python and the speed of C, they ended up with a language with the expressiveness of C and the speed of python.</text></comment>
<story><title>On comparing languages, C++ and Go</title><url>http://blog.grok.se/2013/10/on-comparing-languages-c-and-go/</url></story><parent_chain><item><author>tptacek</author><text>I&amp;#x27;ve been following this whole business card raytracer story and wonder if people might be missing the forest for the trees.&lt;p&gt;It would be a little nutty to suggest that Golang 1.1 is going to give optimized C code a run for its money. Nobody could seriously be suggesting that.&lt;p&gt;What is surprising is that the naive expression of an &amp;quot;interesting&amp;quot; compute-bound program in both languages are as close as they are.&lt;p&gt;Most C&amp;#x2F;C++ code --- the overwhelming majority, in fact --- is not especially performance sensitive. It often happens to have performance and memory footprint demands that exceed the capabilities of naive Python, but that fit squarely into the capabilities of naive C.&lt;p&gt;The expectation of many C programmers, myself included, is that there&amp;#x27;d still be marked difference between Go and C for this kind of code. But it appears that there may not be.&lt;p&gt;This doesn&amp;#x27;t suggest that I&amp;#x27;d want to try to fit Golang into a kernel module and write a driver with it, but it does further suggest that maybe I&amp;#x27;d be a little silly to write my next &amp;quot;must be faster than Python&amp;quot; program in C.</text></item></parent_chain><comment><author>plorkyeran</author><text>&amp;gt; It would be a little nutty to suggest that Golang 1.1 is going to give optimized C code a run for its money. Nobody could seriously be suggesting that.&lt;p&gt;AFAICT, the entire situation started only because the article was submitted to &amp;#x2F;r&amp;#x2F;Golang and &amp;#x2F;r&amp;#x2F;C++ with the trollbait title &amp;quot;Business Card Ray Tracer: Go faster than C++&amp;quot;, and not because of anything in the article itself (which was actually a pretty good article).</text></comment>