<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>bjarne &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/bjarne/</link>
	<description>Feed of posts on WordPress.com tagged "bjarne"</description>
	<pubDate>Thu, 03 Dec 2009 10:12:01 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Bjarne på toppen]]></title>
<link>http://hannespatchwork.wordpress.com/2009/06/22/bjarne-pa-toppen/</link>
<pubDate>Mon, 22 Jun 2009 16:59:25 +0000</pubDate>
<dc:creator>"HANNES"</dc:creator>
<guid>http://hannespatchwork.wordpress.com/2009/06/22/bjarne-pa-toppen/</guid>
<description><![CDATA[Ja det er jo dejligt, når han er på toppen, men det er han nu næsten altid. Men det var også dejligt]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ja det er jo dejligt, når han er på toppen, men det er han nu næsten altid. <a href="http://hannespatchwork.wordpress.com/files/2009/06/ritastc3a6ppe2ok.jpg"><img class="alignnone size-full wp-image-3189" title="ritastæppe2ok" src="http://hannespatchwork.wordpress.com/files/2009/06/ritastc3a6ppe2ok.jpg" alt="ritastæppe2ok" width="450" height="600" /></a></p>
<p>Men det var også dejligt, at jeg kunne lokke ham, op på stigen, så han kunne tage et billede af Ritas flotte tæppe &#8211; sådan lidt fra oven&#8230;&#8230;Dette var det billede Bjarne tog.</p>
<p><a href="http://hannespatchwork.wordpress.com/files/2009/06/ritastc3a6ppe1ok.jpg"><img class="alignnone size-full wp-image-3188" title="ritastæppe1ok" src="http://hannespatchwork.wordpress.com/files/2009/06/ritastc3a6ppe1ok.jpg" alt="ritastæppe1ok" width="450" height="280" /></a></p>
<p>Det er et rigtig flot reste tæppe, men bemærk alle de flotte detajler.<a href="http://hannespatchwork.wordpress.com/files/2009/06/ritastc3a6ppe3ok.jpg"><img class="alignnone size-full wp-image-3190" title="ritastæppe3ok" src="http://hannespatchwork.wordpress.com/files/2009/06/ritastc3a6ppe3ok.jpg" alt="ritastæppe3ok" width="450" height="337" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Varje bransch har sina hjältar...]]></title>
<link>http://diskrepans.wordpress.com/2009/06/12/varje-bransch-har-sina-hjaltar/</link>
<pubDate>Fri, 12 Jun 2009 17:20:01 +0000</pubDate>
<dc:creator>CJ</dc:creator>
<guid>http://diskrepans.wordpress.com/2009/06/12/varje-bransch-har-sina-hjaltar/</guid>
<description><![CDATA[&#8230;och sina ideal. Och ibland är likheterna få Eva Longoria (film &amp; TV-stjärna) samt Bjarne ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>&#8230;och sina ideal. Och ibland är likheterna få <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Eva Longoria (film &#38; TV-stjärna) samt Bjarne Stroustrup (grundare av programmeringsspråket C++).</p>
<p><a href="http://diskrepans.wordpress.com/files/2009/06/293-longoria-eva-0916071.jpg"><img src="http://diskrepans.wordpress.com/files/2009/06/293-longoria-eva-0916071.jpg?w=185" alt="293.longoria.eva.091607" title="293.longoria.eva.091607" width="185" height="300" class="alignnone size-medium wp-image-911" /></a><a href="http://diskrepans.wordpress.com/files/2009/06/bjarnestroustrup1.jpg"><img src="http://diskrepans.wordpress.com/files/2009/06/bjarnestroustrup1.jpg?w=300" alt="BjarneStroustrup" title="BjarneStroustrup" width="300" height="225" class="alignnone size-medium wp-image-912" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Sketching User Experiences]]></title>
<link>http://interactiveblackbox.wordpress.com/2008/10/11/sketching-user-experiences/</link>
<pubDate>Sat, 11 Oct 2008 21:33:53 +0000</pubDate>
<dc:creator>interactiveblackbox</dc:creator>
<guid>http://interactiveblackbox.wordpress.com/2008/10/11/sketching-user-experiences/</guid>
<description><![CDATA[This is an interesting book about designing interactive systems.  I have bought the book if someone ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This is an interesting book about designing interactive systems. </p>
<p>I have bought the book if someone from MMD will borrow it. </p>
<p>The Author Bill Buxton, refers to video as a good way to sketch the user experience. You can find some</p>
<p>Video examples on.  </p>
<p><a href="http://books.elsevier.com/companions/defaultindividual.asp?isbn=9780123740373">http://books.elsevier.com/companions/defaultindividual.asp?isbn=9780123740373</a></p>
<p>/Bjarne S.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Thomas, Thomas II. Bjarne. Tyrkiet 2008]]></title>
<link>http://suntrip.wordpress.com/2008/08/25/thomas-thomas-ii-bjarne-tyrkiet-2008/</link>
<pubDate>Mon, 25 Aug 2008 07:05:32 +0000</pubDate>
<dc:creator>suntrip</dc:creator>
<guid>http://suntrip.wordpress.com/2008/08/25/thomas-thomas-ii-bjarne-tyrkiet-2008/</guid>
<description><![CDATA[Pludselig dukkede et velkendt ansigt op blandt de mange tusinder af promenerende mennesker på havnep]]></description>
<content:encoded><![CDATA[Pludselig dukkede et velkendt ansigt op blandt de mange tusinder af promenerende mennesker på havnep]]></content:encoded>
</item>
<item>
<title><![CDATA[Bjarne Stroustrup]]></title>
<link>http://jaberme.wordpress.com/2008/08/07/bjarne-stroustrup/</link>
<pubDate>Thu, 07 Aug 2008 19:07:46 +0000</pubDate>
<dc:creator>jaberme</dc:creator>
<guid>http://jaberme.wordpress.com/2008/08/07/bjarne-stroustrup/</guid>
<description><![CDATA[Bjarne, creador del lenguaje C++ suele dejar consejos bastante buenos en su página web personal. Uno]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://en.wikipedia.org/wiki/Bjarne_Stroustrup">Bjarne</a>, creador del lenguaje C++ suele dejar consejos bastante buenos en su página <a href="http://www.research.att.com/~bs/">web personal</a>. Uno de los que yo creo más útiles es el que versa sobre la elección de un buen compilador de C++. Es lógico pensar que quien mejor que el creador del lenguaje para aconsejar a un neófito sobre el mejor compilador a usar.</p>
<p>La elección del compilador es seria, porque por un lado debe conocer al procesador, como suelo aconsejar yo (tanto para quien me pregunta como para mi mismo). Pero por otro lado debe ser un compilador que se ajustes a los estándares ISO en aras de la portabililidad del código. En este sentido la lista que Bjarne proporciona cumple las espectativas, la lista, si bien incompleta -como se encarga el mismo de advertir, pues no conoce todos los compiladores habidos y por haber- :</p>
<ul>
<li> <a href="http://developer.apple.com/tools/macosxtools.html">Apple C++</a>. It also comes with OS X on the developer tools CD.</li>
<li> <a href="http://www.bloodshed.net/devcpp.html">Bloodshed Dev-C++</a>. A GCC-based (Mingw) IDE.</li>
<li> <a href="http://www.borland.com/downloads/download_cbuilder.html">Borland C++</a></li>
<li> <a href="http://www.cygwin.com/">Cygwin (GNU C++)</a></li>
<li> <a href="http://www.digitalmars.com/">Digital Mars C++</a></li>
<li> <a href="http://www.mingw.org/">MINGW &#8211; &#8220;Minimalist GNU for Windows&#8221;</a>. Another GCC version for Windows including a free (non-GPL) w32api.</li>
<li> <a href="http://www.delorie.com/djgpp">DJ Delorie&#8217;s C++ development system for DOS/Windows (GNU C++)</a></li>
<li> <a href="http://www.gnu.org/software/gcc/gcc.html">GNU CC source</a></li>
<li> <a href="http://www.intel.com/software/products/compilers/clin/noncom.htm">Intel C++ for linux</a></li>
<li> <a href="http://llvm.cs.uiuc.edu/">The LLVM Compiler Infrastructure</a> (based on GCC).</li>
<li> <a href="http://www.microsoft.com/express/vc">Microsoft Visual C++ 2008 Express edition</a>.</li>
<li> <a href="http://developers.sun.com/sunstudio">Sun Studio</a>.</li>
</ul>
<p>Es bueno ve que Bjarne aconseja un compilador de Sun microsystems (quienes desarrollan compiladores y máquinas virtuales java).</p>
<p>Según Bjarne la mejor prueba, o al menos la primera que debe pasar un compilador es que sea capaz de compilar el sigueinte código sin problemas:</p>
<pre>
<pre class="brush: csharp;">
#include&lt;iostream&gt;
#include&lt;string&gt;

using namespace std;

int main()
{
string s;
cout &gt;&gt; &quot;Please enter your first name followed by a newline\n&quot;;
cin &gt;&gt; s;
cout &lt;&lt; &quot;Hello, &quot; &lt;&lt; s &lt;&lt; '\n';
return 0; // this return statement isn't necessary
}
</pre>
</pre>
<p>Es bueno saber a qué compiladores puede acogerse uno, aunque sea de entrada y para aprender.</p>
<p>Por otro lado y en uno de sus comentarios, me siento identificado porque esto que dice Bjarne es<br />
algo que llevo diciendo yo desde 2006. Es relativo a C#, lo cito textualmente :</p>
<h2><a name="Csharp"> What do you think of C#?</a></h2>
<p>I have no comments on C# as a language. It will take a lot to persuade me that the world needs yet another proprietary language (YAPL). It will be especially hard to persuade me that it needs a language that is closely integrated with a specific proprietary operating system.</p>
<p>If you want to write exclusively for the .Net platform, C# isn&#8217;t the worst alternative, but remember that C++ is a strongly supported &#8211; though less strongly hyped &#8211; alternative on that platform.</p>
<pre>De este párrafo me quedo con "a language that is closely integrated with a specific proprietary
operating system" lo que suscribe mis sospechas -publicadas en <a href="http://www.ace.ual.es/~jaberme/pcw/vista.pdf">PC-WORLD</a>- acerca de la mal
intencionada relación entre C# y el sistema operativo windows vista .... que cada uno juzgue como
crea conveniente. 

Nunca está de más pasarse por la página de semajante genio para leerlo, que lo que cuenta es muy útil
y gratis. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[CSC Saxo Bank wins the Tour De France]]></title>
<link>http://touringdane.com/2008/07/27/csc-saxo-bank-wins-the-tour-de-france/</link>
<pubDate>Sun, 27 Jul 2008 05:26:05 +0000</pubDate>
<dc:creator>slartie</dc:creator>
<guid>http://touringdane.com/2008/07/27/csc-saxo-bank-wins-the-tour-de-france/</guid>
<description><![CDATA[Congratulations go out to Bjarne Riis and the rest of his team. The boys did well. Great job!]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Congratulations go out to Bjarne Riis and the rest of his team. The boys did well. Great job!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Paczuszka z merlin'a]]></title>
<link>http://paaavl0.wordpress.com/2008/07/14/paczuszka-z-merlina/</link>
<pubDate>Mon, 14 Jul 2008 11:28:33 +0000</pubDate>
<dc:creator>Paweł</dc:creator>
<guid>http://paaavl0.wordpress.com/2008/07/14/paczuszka-z-merlina/</guid>
<description><![CDATA[Dzisiaj rozpoczynam naukę języka C++ z dwiema nowymi, ledwo co rozpakowanymi książkami: &#8220;Język]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Dzisiaj rozpoczynam naukę języka C++ z dwiema nowymi, ledwo co rozpakowanymi książkami:</p>
<ul>
<li>&#8220;Język C++&#8221; &#8211; Bjarne Stroustrup</li>
<li>&#8220;Język C++ &#8211; ćwiczenia i rozwiązania&#8221; &#8211; David Vandevoorde</li>
</ul>
<p>Choć rozmiary pierwszej z nich mogą przerażać (ponad 900 stron) to mam nadzieję, że nie zniechęcę się do jej lektury i że będzie ona równie przyjemna co lektura dwóch innych, już rozpracowanych &#8220;książeczek&#8221; o języku C.</p>
<p>Życzcie mi powodzenia. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[BJARNE MELGAARD PRESENTA SUS ÚLTIMOS ÓLEOS HECHOS EN BARCELONA]]></title>
<link>http://mentesynquietas.wordpress.com/2007/11/08/bjarne-melgaard-presenta-sus-ultimos-oleos-hechos-en-barcelona/</link>
<pubDate>Thu, 08 Nov 2007 21:09:52 +0000</pubDate>
<dc:creator>BIKTOR</dc:creator>
<guid>http://mentesynquietas.wordpress.com/2007/11/08/bjarne-melgaard-presenta-sus-ultimos-oleos-hechos-en-barcelona/</guid>
<description><![CDATA[Galería Senda,Barcelona.A partir del 9 de Noviembre El retrato cariñoso de un Chihuahua, unos monstr]]></description>
<content:encoded><![CDATA[Galería Senda,Barcelona.A partir del 9 de Noviembre El retrato cariñoso de un Chihuahua, unos monstr]]></content:encoded>
</item>
<item>
<title><![CDATA[C++ : Multiple Access Specifiers in a Class]]></title>
<link>http://zamanbakshi.wordpress.com/2007/06/05/c-multiple-access-specifiers-in-a-class/</link>
<pubDate>Tue, 05 Jun 2007 10:38:00 +0000</pubDate>
<dc:creator>Zaman</dc:creator>
<guid>http://zamanbakshi.wordpress.com/2007/06/05/c-multiple-access-specifiers-in-a-class/</guid>
<description><![CDATA[On May 27th, Ramshankar in one of the C++ communities at Orkut, asked what seemed like a pretty inno]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>On May 27th, <a href="http://www.orkut.com/Profile.aspx?uid=7852952172124826284">Ramshankar</a> in one of the <a href="http://www.orkut.com/Community.aspx?cmm=38750">C++ communities</a> at <a href="http://www.orkut.com/">Orkut</a>, asked what seemed like a pretty innocuous question:</p>
<p><span style="font-weight:bold;font-style:italic;color:rgb(255, 0, 0);">   class</span><span style="font-style:italic;color:rgb(255, 0, 0);"> TUid</span><br /><span style="font-style:italic;color:rgb(255, 0, 0);"> {</span><br /><span style="font-weight:bold;font-style:italic;color:rgb(255, 0, 0);">public</span><span style="font-style:italic;color:rgb(255, 0, 0);">:</span><br /><span style="font-style:italic;color:rgb(255, 0, 0);"> IMPORT_C TInt </span><span style="font-weight:bold;font-style:italic;color:rgb(255, 0, 0);">operator</span><span style="font-style:italic;color:rgb(255, 0, 0);">==(</span><span style="font-weight:bold;font-style:italic;color:rgb(255, 0, 0);">const</span><span style="font-style:italic;color:rgb(255, 0, 0);"> TUid&#38; aUid) </span><span style="font-weight:bold;font-style:italic;color:rgb(255, 0, 0);">const</span><span style="font-style:italic;color:rgb(255, 0, 0);">;</span><br /><span style="font-weight:bold;font-style:italic;color:rgb(255, 0, 0);"> static</span><span style="font-style:italic;color:rgb(255, 0, 0);"> </span><span style="font-weight:bold;font-style:italic;color:rgb(255, 0, 0);">inline</span><span style="font-style:italic;color:rgb(255, 0, 0);"> TUid Null();</span><br /><span style="font-weight:bold;font-style:italic;color:rgb(255, 0, 0);">public</span><span style="font-style:italic;color:rgb(255, 0, 0);">:</span><br /><span style="font-style:italic;color:rgb(255, 0, 0);"> TInt32 iUid;</span><br /><span style="font-style:italic;color:rgb(255, 0, 0);"> };</span></p>
<p><span style="font-style:italic;color:rgb(255, 0, 0);">What is the purpose of defining &#8220;public&#8221; section again? Is it for </span><span style="font-style:italic;color:rgb(255, 0, 0);">allowing:</span></p>
<p><span style="font-style:italic;color:rgb(255, 0, 0);">TUid myType = { 0&#215;01232423 };</span></p>
<p>Multiple public/protected/private sections are very much allowed in C++. In fact, they are seen in <a href="http://en.wikipedia.org/wiki/Microsoft_Foundation_Class_Library">MFC</a> wizard generated code. But, the real problem lay in not whether it was allowed, but why has this been allowed? As the <a href="http://www.esnips.com/doc/b5bda452-32e1-4aa2-b1ae-83fb771bcc5d/C++-Standard-INCITS+ISO+IEC+14882-2003">C++ standard</a> states that:</p>
<p><i><span style="color:rgb(255, 102, 0);">12. Nonstatic data members of a (non-union) class declared without an intervening access-specifier are allocated so that later members have higher addresses within a class object. The order of allocation of nonstatic data members separated by an access-specifier is unspecified (_class.access.spec_). </span></p>
<p></i>So, to find accurate (reliable) answer I had to email <a href="http://www.research.att.com/%7Ebs/">Bjarne</a>, and this was his reply:</p>
<p><span style="color:rgb(255, 102, 0);">Consider</span></p>
<p><span style="color:rgb(255, 102, 0);">    </span><span style="font-weight:bold;color:rgb(0, 153, 0);">struct</span><span style="color:rgb(0, 153, 0);"> S {</span><br /><span style="color:rgb(0, 153, 0);">    </span><span style="font-weight:bold;color:rgb(0, 153, 0);">public</span><span style="color:rgb(0, 153, 0);">:</span><br /><span style="color:rgb(0, 153, 0);">       </span><span style="font-weight:bold;color:rgb(0, 153, 0);">int</span><span style="color:rgb(0, 153, 0);"> a;</span><br /><span style="color:rgb(0, 153, 0);">    </span><span style="font-weight:bold;color:rgb(0, 153, 0);">private</span><span style="color:rgb(0, 153, 0);">:</span><br /><span style="color:rgb(0, 153, 0);">       </span><span style="font-weight:bold;color:rgb(0, 153, 0);">int</span><span style="color:rgb(0, 153, 0);"> b;</span><br /><span style="color:rgb(0, 153, 0);">    </span><span style="font-weight:bold;color:rgb(0, 153, 0);">public</span><span style="color:rgb(0, 153, 0);">:</span><br /><span style="color:rgb(0, 153, 0);">       </span><span style="font-weight:bold;color:rgb(0, 153, 0);">int</span><span style="color:rgb(0, 153, 0);"> c;</span><br /><span style="color:rgb(0, 153, 0);">    </span><span style="font-weight:bold;color:rgb(0, 153, 0);">private</span><span style="color:rgb(0, 153, 0);">:</span><br /><span style="color:rgb(0, 153, 0);">         </span><span style="font-weight:bold;color:rgb(0, 153, 0);">int </span><span style="color:rgb(0, 153, 0);">d;</span><br /><span style="color:rgb(0, 153, 0);">    };</span></p>
<p><span style="color:rgb(255, 102, 0);">Is the compiler allowed to allocate the private members next to each other? (the answer is yes).<br />
<blockquote>The reason for the rule was early ideas of separating private data from public data for some implementations to be able to alleviate code evolution problems when the data layout changed.</p></blockquote>
<p>For example if you allocated public before private, then adding a private member could be done without affecting the public intercase (after creation). As far as I know, no compiler has ever done that.</span></p>
<p><span style="color:rgb(255, 102, 0);">However, some compilers do use rearrangement to create more compact layouts. For example:</span></p>
<p><span style="color:rgb(255, 102, 0);">    </span><span style="font-weight:bold;color:rgb(0, 153, 0);">struct</span><span style="color:rgb(0, 153, 0);"> SS {</span><br /><span style="color:rgb(0, 153, 0);">       </span><span style="font-weight:bold;color:rgb(0, 153, 0);">char</span><span style="color:rgb(0, 153, 0);"> a;</span><br /><span style="color:rgb(0, 153, 0);">    </span><span style="font-weight:bold;color:rgb(0, 153, 0);">public</span><span style="color:rgb(0, 153, 0);">:</span><br /><span style="color:rgb(0, 153, 0);">       </span><span style="font-weight:bold;color:rgb(0, 153, 0);">int</span><span style="color:rgb(0, 153, 0);"> b;</span><br /><span style="color:rgb(0, 153, 0);">    </span><span style="font-weight:bold;color:rgb(0, 153, 0);">public</span><span style="color:rgb(0, 153, 0);">:</span><br /><span style="color:rgb(0, 153, 0);">       </span><span style="font-weight:bold;color:rgb(0, 153, 0);">char</span><span style="color:rgb(0, 153, 0);"> c;</span><br /><span style="color:rgb(0, 153, 0);">    </span><span style="font-weight:bold;color:rgb(0, 153, 0);">public</span><span style="color:rgb(0, 153, 0);">:</span><br /><span style="color:rgb(0, 153, 0);">       </span><span style="font-weight:bold;color:rgb(0, 153, 0);">int</span><span style="color:rgb(0, 153, 0);"> d;</span><br /><span style="color:rgb(0, 153, 0);">    </span><span style="font-weight:bold;color:rgb(0, 153, 0);">public</span><span style="color:rgb(0, 153, 0);">:</span><br /><span style="color:rgb(0, 153, 0);">       </span><span style="font-weight:bold;color:rgb(0, 153, 0);">char</span><span style="color:rgb(0, 153, 0);"> e;</span><br /><span style="color:rgb(0, 153, 0);">    };</span></p>
<p><span style="color:rgb(255, 102, 0);">If members are allocated in declaration order, the size will be 5 words, but you can (legally) reorder to get 3 words (assuming a 4-byte word).</span></p>
<p><span style="color:rgb(255, 102, 0);">Personally, I have never found this useful.</span></p>
<p>I&#8217;ll leave as an exercise how to reorder to get 3 <a href="http://en.wikipedia.org/wiki/Word_%28computing%29">words</a> . <span style="color:rgb(255, 0, 0);"></span></p>
<p>But, a mystery still remains as <a href="http://www.orkut.com/Profile.aspx?uid=15418884273347729852">André</a> asked:</p>
<p><span style="color:rgb(51, 153, 153);">Can you write any piece of strictly conforming code for which 9p12 (the above stated standard snippet) makes ANY difference for a non-POD <span style="color:rgb(0, 0, 0);">(<a href="http://en.wikipedia.org/wiki/Plain_Old_Data_Structures">Plain Old Data</a>)</span> type?</span></p>
<p><span style="color:rgb(51, 153, 153);">Put another way (this is a different formulation of the same question):</span><br /><span style="color:rgb(51, 153, 153);">Can you write any piece of code that uses 9p12 (the fact that the order is specified) for a non-POD type, without invoking <a href="http://zamanbakshifirst.blogspot.com/2006/11/c-whats-undefined-behavior-in-c.html">undefined behaviour</a>?</span></p>
<p>Can you?!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[C++ : Are NULL and C++ standard library part of the C++ language?]]></title>
<link>http://zamanbakshi.wordpress.com/2007/03/04/c-are-null-and-c-standard-library-part-of-the-c-language/</link>
<pubDate>Sun, 04 Mar 2007 17:51:00 +0000</pubDate>
<dc:creator>Zaman</dc:creator>
<guid>http://zamanbakshi.wordpress.com/2007/03/04/c-are-null-and-c-standard-library-part-of-the-c-language/</guid>
<description><![CDATA[NO, C++ standard library is not a part of the C++ language but provides support. The question was ra]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>NO, <a href="http://www.esnips.com/doc/b5bda452-32e1-4aa2-b1ae-83fb771bcc5d/C++-Standard-INCITS+ISO+IEC+14882-2003">C++ standard</a> library is not a part of the C++ language but provides support.</p>
<p>The question was raised in an <a href="http://www.orkut.com/">Orkut</a> forum, and who better to ask than <a href="http://www.research.att.com/%7Ebs/homepage.html">Bjarne</a>. This is what his reply to my email was:</p>
<div style="direction:ltr;color:rgb(255, 0, 0);"><span class="q">Zaman Bakshi wrote:<br />&#62; Dear Mr Stroustrup,<br />&#62;<br />&#62; I hope this email finds you in good health. Sir, can we say that the<br />&#62; standard C and C++ libraries are a part of the C++ &#8216;language&#8217;? Or<br />&#62; should they be considered as a support for the language and not a part<br />&#62; of it? This point was raised in the C/C++ programmers&#8217; community (that<br />&#62; I am moderating) with reference to NULL. I cited your TC++PL and wrote<br />&#62; const int NULL = 0; to be the correct implementation of NULL in C++,<br />&#62; if it has to be defined. We know that 0 should be used instead of<br />&#62; NULL, but what if NULL has to be defined. A null pointer is defined in<br />&#62; the &#8216;C++ standard&#8217; but NULL is used with reference to the C libraries.<br />&#62; My answer was that NULL is not a part of the language but part of the<br />&#62; C standard libraries referred in the C++ standard.</p>
<p></span></div>
<div style="direction:ltr;color:rgb(255, 0, 0);"><span style="color:rgb(0, 153, 0);">I distinguish between the C++ language and the C++ standard library.</span><br /><span style="color:rgb(0, 153, 0);">They are both part of the C++ standard, though, and shipped with every</span><br /><span style="color:rgb(0, 153, 0);">implementation. Some people (slightly incorrect I think, but</span><br /><span style="color:rgb(0, 153, 0);">understandably) refer to all that is in &#8220;The C++ language standard&#8221; as</span><br /><span style="color:rgb(0, 153, 0);">&#8220;the C++ language&#8221;.</span></div>
<div style="direction:ltr;color:rgb(255, 0, 0);"><span class="q"><br />&#62;<br />&#62; So, are NULL and the libraries part of the &#8216;C++ language&#8217;?</p>
<p></span></div>
<p><span style="color:rgb(0, 153, 0);">I would say no. Even though you can use NULL after #including that</span><br /><span style="color:rgb(0, 153, 0);">appropriate standard library header, you don&#8217;t have to.</span></p>
<p><span style="color:rgb(0, 153, 0);">In C++0x, we&#8217;ll get nullptr as a keyword indicating the null pointer.</span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[C++ : Free-store versus Heap]]></title>
<link>http://zamanbakshi.wordpress.com/2007/02/23/c-free-store-versus-heap/</link>
<pubDate>Thu, 22 Feb 2007 21:54:00 +0000</pubDate>
<dc:creator>Zaman</dc:creator>
<guid>http://zamanbakshi.wordpress.com/2007/02/23/c-free-store-versus-heap/</guid>
<description><![CDATA[What&#8217;s the difference between the heap and the free-store? The C++ Programming Language keeps ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>What&#8217;s the difference between the heap and the free-store? The C++ Programming Language keeps on referring them interchangeably. There was as huge cry over this issue in C/C++ programmer&#8217;s community in Orkut. I had to shoot a mail to <a href="http://www.research.att.com/%7Ebs/homepage.html">Dr. Bjarne Stroustrup</a>. Here&#8217;s our conversation:</p>
<p><span style="font-weight:bold;">My Mail:</span></p>
<p><span style="font-style:italic;color:rgb(255, 0, 0);">Dear Mr Stroustrup,</span></p>
<p><span style="font-style:italic;color:rgb(255, 0, 0);">Sorry to disturb you again. You have mentioned several times in the TC++PL that &#8216;new&#8217; allocates memory from the &#8216;free store (or heap)&#8217;. There has been a huge cry on the C++ community at Orkut (that I am moderating) as to whether free-store is the same as heap. The argument given against is that <a href="http://en.wikipedia.org/wiki/Herb_Sutter">Mr Herb Sutter</a> has mentioned that the free-store is different from the heap: </span></p>
<p><a href="http://www.gotw.ca/gotw/009.htm" target="_blank">http://www.gotw.ca/gotw/009.htm</a></p>
<p><span style="font-style:italic;color:rgb(255, 0, 0);">and that global &#8216;new&#8217; has nothing to do with the heap. </span></p>
<p><span style="font-style:italic;color:rgb(255, 0, 0);">So, if so, why has TC++PL used &#8216;free store (or heap)&#8217; instead of mentioning the use of &#8216;heap&#8217; separately.</span></p>
<p><span style="font-style:italic;color:rgb(255, 0, 0);">Waiting anxiously for the response.</span></p>
<p><span style="font-style:italic;color:rgb(255, 0, 0);">Regards,</span><br /><span class="sg"><span style="font-style:italic;color:rgb(255, 0, 0);">Zaman Bakshi</span></p>
<p><span style="font-weight:bold;">His Reply:</span></p>
<p></span>
<div style="direction:ltr;color:rgb(0, 153, 0);font-style:italic;">Note that Herb says: &#8220;Note about Heap vs. Free Store: We distinguish between &#8220;heap&#8221; and &#8220;free store&#8221; because the draft deliberately leaves unspecified the question of whether these two areas are related. For example, when memory is deallocated via operator delete, <a href="http://18.4.1.1/" target="_blank">18.4.1.1</a> states:&#8221;</p>
<p>In other word, the &#8220;free store&#8221; vs &#8220;heap&#8221; distinction is Herb&#8217;s attempt to distinguish malloc() allocation from new allocation.</div>
<div style="direction:ltr;color:rgb(0, 153, 0);font-style:italic;"><span class="q"><br />&#62;<br />&#62; So, if so, why has TC++PL used &#8216;free store (or heap)&#8217; instead of<br />&#62; mentioning the use of &#8216;heap&#8217; separately.</p>
<p></span></div>
<p>&#60;!&#8211; D(["mb","
<div>Because even though it is undefined from where new and malloc() get<br />their memory, they typically get them from exactly the same place. It is<br />common for new and malloc() to allocate and free storage from the same<br />part of the computer\'s memory. In that case, &#34;free store&#34; and &#34;heap&#34; are<br />synonyms. I consistently use &#34;free store&#34; and &#34;heap&#34; is not a defined<br />term in the C++ standard (outside the heap standard library algorithms,<br />which are unrelated to new and malloc()). In relation to new, &#34;heap&#34; is<br />simply a word someone uses (typically as a synonym to &#34;free store&#34;) -<br />usually because they come from a different language background.</div>
<p>",1] ); D(["mb","
<div>
<div><span>- Show quoted text -</span></div>
<p><span><br />&#62;<br />&#62; Waiting anxiously for the response.<br />&#62;<br />&#62; Regards,<br />&#62; Zaman Bakshi</p>
<p></span></div>
<p>",0] );  //&#8211;&#62;<span style="color:rgb(0, 153, 0);font-style:italic;">Because even though it is undefined from where new and malloc() get their memory, they typically get them from exactly the same place. It is common for new and malloc() to allocate and free storage from the same part of the computer&#8217;s memory. In that case, &#8220;free store&#8221; and &#8220;heap&#8221; are synonyms. I consistently use &#8220;free store&#8221; and &#8220;heap&#8221; is not a defined term in the C++ standard (outside the heap standard library algorithms, which are unrelated to new and malloc()). In relation to new, &#8220;heap&#8221; is simply a word someone uses (typically as a synonym to &#8220;free store&#8221;) &#8211; usually because they come from a different language background.</span></p>
<p><span style="font-weight:bold;">My Reply:</span></p>
<p><span style="font-style:italic;color:rgb(255, 0, 0);">Thank you Mr. Stroustrup, I had inferred the same thing (about using free store as general &#8212; or better, synonym &#8212; term) and had explained the community. But, I had been requested to reconfirm.</span></p>
<p><span style="font-style:italic;color:rgb(255, 0, 0);">With warm regards,</span><br /><span style="font-style:italic;color:rgb(255, 0, 0);" class="sg"> Zaman Bakshi</span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[C++ : Indeterminate Value]]></title>
<link>http://zamanbakshi.wordpress.com/2007/02/18/c-indeterminate-value/</link>
<pubDate>Sat, 17 Feb 2007 23:49:00 +0000</pubDate>
<dc:creator>Zaman</dc:creator>
<guid>http://zamanbakshi.wordpress.com/2007/02/18/c-indeterminate-value/</guid>
<description><![CDATA[The C language standard clearly &#8216;defines&#8217; what an indeterminate value is in C. But the C]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.esnips.com/doc/f43f92e5-5057-4045-b0ca-62650019c0bd/ISO-Standard-for-the-C-Language">The C language standard</a> clearly &#8216;defines&#8217; what an indeterminate value is in C. But <a href="http://www.esnips.com/doc/b5bda452-32e1-4aa2-b1ae-83fb771bcc5d/C++-Standard-INCITS+ISO+IEC+14882-2003">the C++ standard</a> is missing this definition. Naturally, we can&#8217;t adopt the definition in C standard to C++. I wanted to know, and who could have been more reliable than <a href="http://www.research.att.com/%7Ebs/">Mr. Bjarne Stroustrup</a> to clear this cloud of uncertainty. So, I dashed an email to him. Here&#8217;s the conversation that followed:</p>
<p><span class="sg">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p></span><span style="font-style:italic;color:rgb(153, 0, 0);">Dear Mr Stroustrup,</span></p>
<p><span style="font-style:italic;color:rgb(153, 0, 0);">I am reading D&#38;E, and let me congratulate you for writing such a great book. It has been of a lot of help. Mr. Stroustrup, I am moderating a C++ community on Orkut and there has been a very big issue over what &#8216;indeterminate value&#8217; means for the C++ standard. The C standard clearly states what &#8216;indeterminate value&#8217; means, but the C++ standard though using (indeterminate value) many times doesn&#8217;t specify its definition. Should we regard &#8216;indeterminate value&#8217; in C++ as being undefined, or should we stick to the C standard&#8217;s definition (for &#8216;indeterminate value&#8217;)? </span></p>
<p><span style="font-style:italic;color:rgb(153, 0, 0);">Anxiously waiting for the response.</span></p>
<p><span style="font-style:italic;color:rgb(153, 0, 0);">Regards,</span><br /><span class="sg"><span style="font-style:italic;color:rgb(153, 0, 0);">Zaman Bakshi.</p>
<p></span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p></span>
<div style="direction:ltr;"><span style="font-style:italic;color:rgb(0, 153, 0);">Thanks.</span></p>
<p><span style="font-style:italic;color:rgb(0, 153, 0);">I never used &#8220;indeterminate value&#8221; and hadn&#8217;t noticed that it had &#8220;snug</span><br /><span style="font-style:italic;color:rgb(0, 153, 0);">into&#8221; the C++ standard. I have raised an issue and &#8220;indeterminate value&#8221;</span><br /><span style="font-style:italic;color:rgb(0, 153, 0);">will be defined in C++0x. You can&#8217;t &#8220;stick to C&#8217;s definition&#8221; because</span><br /><span style="font-style:italic;color:rgb(0, 153, 0);">that definition has never been approved for C++ (was introduced into C</span><br /><span style="font-style:italic;color:rgb(0, 153, 0);">relatively lately, I believe). &#8220;indeterminate&#8221; simple means that you</span><br /><span style="font-style:italic;color:rgb(0, 153, 0);">don&#8217;t know what that value is (if could be absolutely any bit pattern</span><br /><span style="font-style:italic;color:rgb(0, 153, 0);">that fits in the object). I believe the C++ standard is specific about</span><br /><span style="font-style:italic;color:rgb(0, 153, 0);">which operations requires a properly initialized object.</span></p>
<p><span style="font-style:italic;color:rgb(0, 153, 0);">Does this address the issues raised in your discussion? If not, please</span><br /><span style="font-style:italic;color:rgb(0, 153, 0);">ask again.</p>
<p></span></div>
<p><span class="sg">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p></span><span style="color:rgb(153, 0, 0);font-style:italic;">Dear Mr Stroustrup,</span></p>
<p><span style="color:rgb(153, 0, 0);font-style:italic;">Thank you for replying to my e-mail. Yes, it does answer my issue. This is exactly what I had inferred, but as you know, developers like me can&#8217;t argue over the standard, so had to clear the doubt. I, like others, are anxiously waiting for C++0x to be out with the standard. Good luck with it. And I thank you again for your response. </span></p>
<p><span style="color:rgb(153, 0, 0);font-style:italic;">Regards,</span><br /><span style="color:rgb(153, 0, 0);font-style:italic;" class="sg">Zaman Bakshi</p>
<p></span><span class="sg">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p></span>
<div style="direction:ltr;"><span style="color:rgb(0, 153, 0);">Thanks. I&#8217;m working hard for C++0x to become C++09. Doing that requires</span><br /><span style="color:rgb(0, 153, 0);">a complete feature freeze and complete WP by the end of 2007.</span></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[C/C++ : Speed Variation]]></title>
<link>http://zamanbakshi.wordpress.com/2006/12/03/cc-speed-variation/</link>
<pubDate>Sat, 02 Dec 2006 21:07:00 +0000</pubDate>
<dc:creator>Zaman</dc:creator>
<guid>http://zamanbakshi.wordpress.com/2006/12/03/cc-speed-variation/</guid>
<description><![CDATA[People believe that C code has faster execution speed than of C++. I argue otherwise. Many C++ gurus]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>People believe that C code has faster execution speed than of C++. I argue otherwise. Many C++ gurus have spent their valuable time explaining that there&#8217;s no difference. Now, I may lack credibility but the writer of C++, <a href="http://www.research.att.com/%7Ebs/">Bjarne Stroustrup</a>, certainly doesn&#8217;t. So, would you believe his words? While browsing the Internet, I found myself laying hands on one of the emails sent to Bajrne to explain his views on this contentious topic. Here&#8217;s the email (in full):</p>
<p><span style="font-style:italic;">TITLE: Speed and size of C versus C++</span></p>
<p><span style="font-style:italic;">PROBLEM: ???</span></p>
<p><span style="font-style:italic;">I also heard the size of C++ program is generally bigger than C. I am a C programmer trying to learn C++.  So, don&#8217;t blame me if I have created any misconception about C++.</span></p>
<p><span style="font-style:italic;">RESPONSE: ???</span></p>
<p><span style="font-style:italic;">For one minor detail: including printf/scanf can include more code than is actually used. An intelligent C++ linker will only get that parts of the stream library REALLY needed.</span></p>
<p><span style="font-style:italic;">RESPONSE: cshaver@informix.com (Craig Shaver @ Informix Software, Inc.)</span></p>
<p><span style="font-style:italic;">Who implements an intelligent C++ linker???  I was under the impression that you get all the functionality in a class when you link, whether you use it or not.  </span></p>
<p><span style="font-style:italic;">RESPONSE: bs@alice.att.com (Bjarne Stroustrup), 12 Jan 93</span><br /><span style="font-style:italic;">      AT&#38;T Bell Laboratories, Murray Hill NJ</span></p>
<p><span style="font-style:italic;">Let me try to clear up one or two points. Consider first a somewhat minimal C and C++ program x1.c:</span></p>
<p><span style="font-style:italic;">    main()</span><br /><span style="font-style:italic;">    {</span><br /><span style="font-style:italic;">        <span style="color:rgb(255, 0, 0);">int</span> i;</span><br /><span style="font-style:italic;">        <span style="color:rgb(255, 0, 0);">for</span> (i = 0; i &#60; 1000000; i++ ) printf(&#8220;Hi,mom!\n&#8221;) ;<br /><span style="font-style:italic;">    }</span></p>
<p><span style="font-style:italic;">and its more C++ looking cousin x2.c:</span><span style="font-style:italic;"></span></p>
<p><span style="font-style:italic;">    main()</span><br /><span style="font-style:italic;">    {</span><br /><span style="font-style:italic;">        <span style="color:rgb(255, 0, 0);">int</span> i;</span><br /><span style="font-style:italic;">       <span style="color:rgb(255, 0, 0);"> for </span>(i = 0; i&#60;1000000; i++ ) cout &#60;&#60; &#8220;Hi,mon!\n&#8221; ;<br /><span style="font-style:italic;">    }</span></p>
<p><span style="font-style:italic;">I compiled and ran x1.c and x2.c:</span></p>
<p><span style="font-style:italic;">c: cc x1.c</span><br /><span style="font-style:italic;">c: size a.out</span><br /><span style="font-style:italic;">text    &#124; data  &#124;   bss   &#124; dec      &#124;  hex</span><br /><span style="font-style:italic;">12288&#124;  6144&#124;   7608&#124; 26040&#124;  65b8</span></p>
<p><span style="font-style:italic;">c: time a.out &#62; /dev/null</span><br /><span style="font-style:italic;">25.5u 0.5s 37r      a.out</span></p>
<p><span style="font-style:italic;">c: PTCC x1.c</span><br /><span style="font-style:italic;">c: size a.out</span><br /><span style="font-style:italic;">text     &#124;data   &#124; bss     &#124; dec       &#124; hex</span><br /><span style="font-style:italic;">12288 &#124; 6144 &#124; 7620  &#124; 26052 &#124;   65c4</span></p>
<p><span style="font-style:italic;">c:  time a.out &#62; /dev/null</span><br /><span style="font-style:italic;">25.7u 0.4s 33r      a.out</span></p>
<p><span style="font-style:italic;">PTCC is the driver for my standard off the-shelf Cfront 3.0 (i.e. I&#8217;m not using any technology you couldn&#8217;t buy half a year ago). Note that the size of the generated code is essentially the same. So is the speed. Running these examples a few times to eliminate random error in the timing mechanism shows that the run-time isn&#8217;t biased one way or the other.</span></p>
<p><span style="font-style:italic;">This is what you should expect for a program in the common sub-set of C and C++. There is fundamental reasons for that. You should expect identical code from two C and C++ compilers using the same technology. The only possibly SYSTEMATIC difference I can think of is that a C++ compiler can use better function call sequences than a C compiler that doesn&#8217;t apply global optimization because in many cases a C compiler must guard against possible calls with differing numbers of arguments where a C++ compiler doesn&#8217;t need to because of C++&#8217;s stronger type checking. In most C and C++ compilers, this difference is theoretical, but I&#8217;m told that in Zortech C++ it is real (i.e. C++ programs are ever so slightly faster than their C equivalents). However, this is all noise, I doubt the difference between C and C++ in this kind of comparison matters to any real programmers. The difference is far smaller than differences between different C compilers &#8211; but surprisingly, it is in C++&#8217;s favor.</span></p>
<p><span style="font-style:italic;">    Programs in the common subset of C and C++ results in</span><br /><span style="font-style:italic;">    equal sized code that execute at equal speed.</span></p>
<p><span style="font-style:italic;">If that conclusion doesn&#8217;t appear to hold, check if your C and C++ compilers are of similar quality. If your C++ compiler appears to loose badly you have the option of using a Cfront variant to get the benefits of your C compiler&#8217;s code generation facilities. If your C compiler loose badly, switch to C++ even if you aren&#8217;t ready to use the &#8220;++ features.&#8221;</span></p>
<p><span style="font-style:italic;">Now, a common argument is &#8220;OK, so C++ can match C for a C programs but as soon as you use the REAL C++ features your programs get bigger and slower.&#8221; Clearly you can write big and slow programs in any language (even C), but you don&#8217;t necessarily take a performance hit when you start using C++. Consider x2.c. It uses the C++ stream I/O library that is certainly bigger than C&#8217;s stdio and is unlikely to be tuned to the same degree as stdio. It is also a library that</span><br /><span style="font-style:italic;">uses a very large sub-set of C++&#8217;s features in its interface and implementation (operator overloading, multiple inheritance, virtual functions, etc.):</span></p>
<p><span style="font-style:italic;">c: PTCC x2.c</span><br /><span style="font-style:italic;">c: size a.out</span><br /><span style="font-style:italic;">c: text  &#124;  data  &#124;  bss  &#124;  dec   &#124;  hex</span><br /><span style="font-style:italic;">17408  &#124; 2048  &#124;  0     &#124;19456&#124;  4c00</span><br /><span style="font-style:italic;">c: time a.out &#62; /dev/null</span><br /><span style="font-style:italic;">32.8u 1.0s 43r      a.out</span></p>
<p><span style="font-style:italic;">Surprisingly enough, the code generated for x2.c is noticeably smaller than the code generated for x1.c (75% of x1.o) though &#8211; as expected it runs a bit slower (29% user cpu time, 16% better elapse time).</span></p>
<p><span style="font-style:italic;">I claim, but cannot prove, that the run-time overhead is primarily a difference in tuning. Other programs that rely heavily on C++ features show improvements over their C counterparts &#8211; and others again show overhead. The differences does not appear systematic to me; that is, they are differences in design and effort, rather than inherent overhead in C or C++.</span></p>
<p><span style="font-style:italic;">The space advantage of the C++ program is an advantage of the same kind; that is, it is there because a little extra care and thought was spent. Other implementations of stream I/O will show different space and time usage, as will different implementations of stdio. To do simple things only the essential parts of the stream I/O library is brought in. You don&#8217;t actually need a very &#8220;intelligent&#8221; linker, the dumb old Unix ld will do: Just manually split your implementation into several .c files. A simple example:</span></p>
<p><span style="font-style:italic;">X.h:</span><br /><span style="font-style:italic;">    <span style="color:rgb(255, 0, 0);">class</span> X {</span><br /><span style="font-style:italic;">        // details</span><br /><span style="font-style:italic;">    <span style="color:rgb(255, 0, 0);">public</span>:</span><br /><span style="font-style:italic;">        <span style="color:rgb(255, 0, 0);">void </span>f();    // common function</span><br /><span style="font-style:italic;">        <span style="color:rgb(255, 0, 0);">void </span>g();    // uncommon function</span><br /><span style="font-style:italic;">        // more functions</span><br /><span style="font-style:italic;">    };</span></p>
<p><span style="font-style:italic;">    </span><br /><span style="font-style:italic;">X1.c:</span><br /><span style="font-style:italic;">    // common functions:</span></p>
<p><span style="font-style:italic;">    <span style="color:rgb(255, 0, 0);">void </span>X::f() { &#8230; }</span></p>
<p><span style="font-style:italic;">X2.c:</span><br /><span style="font-style:italic;">    // uncommon functions:</span></p>
<p><span style="font-style:italic;">    <span style="color:rgb(255, 0, 0);">void</span> X::g() { &#8230; }</span></p>
<p><span style="font-style:italic;">Now, any half-way decent archive program can bring in the object code for X1.c (only) for programs that use the common functions (only) and leave the expense of bringing in the object code for X2.c for the programs that actually use functions defined in X2.c.</span></p>
<p><span style="font-style:italic;">There exist linkers that can do that without human help (mostly in the PC world), I just happen not to have one. I think it is important to note that this technique and the tools that supports it carried over from C to C++. We wasn&#8217;t at the mercy of some &#8220;smart&#8221; and possibly espensive or unavailable technology. We don&#8217;t have to forget or loose all of our effective techniques in moving from C to C++. We should &#8211; as ever &#8211; use them with a suitable amount of judgement.</span></p>
<p><span style="font-style:italic;">C++ was designed not to leave room &#8220;below&#8221; for a lower level language, except assembler for machine specific operations.</span></p>
<p>I found this email on this following link:<br /><a href="http://nkari.uw.hu/Tutorials/CPPTips/split_impl">http://nkari.uw.hu/Tutorials/CPPTips/split_impl</a></p>
<p>You can click on it to check for any inconsistencies. So, I take his words on this issue, do you?</span></span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[C++ : What's the value of i++ + i++?]]></title>
<link>http://zamanbakshi.wordpress.com/2006/11/13/c-whats-the-value-of-i-i/</link>
<pubDate>Sun, 12 Nov 2006 20:17:00 +0000</pubDate>
<dc:creator>Zaman</dc:creator>
<guid>http://zamanbakshi.wordpress.com/2006/11/13/c-whats-the-value-of-i-i/</guid>
<description><![CDATA[It&#8217;s undefined !! Basically, in C and C++, if you read a variable twice in an expression where]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>It&#8217;s <a href="http://zamanbakshifirst.blogspot.com/2006/11/c-whats-undefined-behavior-in-c.html">undefined</a> !! Basically, in C and C++, if you read a variable twice in an expression where you also write it, the result is undefined. Don&#8217;t do that. Another example is:
<pre> v[i] = i++;</pre>
<p> Related example:
<pre> f(v[i],i++);</pre>
<p> Here, the result is undefined because the order of evaluation of function arguments are undefined.</p>
<p>You can even check it from <a href="http://www.research.att.com/%7Ebs/bs_faq2.html">Bjarne&#8217;s own blog on  C++ FAQs</a>.</p>
<p><span style="font-weight:bold;">Now click on the ads to your right</span> :p</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
