<story><title>C++ Annotations</title><url>http://www.icce.rug.nl/documents/cplusplus/</url></story><parent_chain></parent_chain><comment><author>cjensen</author><text>So I immediately checked my favorite language gotcha, the macro NULL. The text is entirely wrong. The macro NULL is harmful in both C and C++. It is not &amp;quot;stylistic&amp;quot; AT ALL.&lt;p&gt;Here&amp;#x27;s the problem with the macro: the macro NULL can be either 0 or can be (void * ) 0. The issue is that the former can be accidentally interpreted as an integer depending on context.&lt;p&gt;In both C and C++, this manifests when you pass NULL to a varargs function. Instead of passing in a null pointer, the compiler may instead pass in an integer zero. If pointers and ints have different sizes, hilarity ensues. If the null pointer does not have the same bit representation as int zero, hilarity ensues.&lt;p&gt;In C++, this happens even more commonly. If there is an operator overload and you pass in NULL, then if NULL is 0 it will chose the int overload, if NULL is (void * ) 0 it will chose a pointer overload.&lt;p&gt;Never use NULL. Ever.</text></comment>
<story><title>C++ Annotations</title><url>http://www.icce.rug.nl/documents/cplusplus/</url></story><parent_chain></parent_chain><comment><author>kbenson</author><text>It&amp;#x27;s becoming increasingly hard to gather any useful information about software development topic from a concise title because rampant terminology growth and (sometimes fueled by reuse of concepts with different terminology in different projects) to the point that concise titles are almost always ambiguous in some manner.&lt;p&gt;For example, I&amp;#x27;ve seen this submission for hours now, and every time I assumed it was sort of function annotation&amp;#x2F;decorator syntax addition to achieve some interesting result, which didn&amp;#x27;t pique my interest at those times.&lt;p&gt;Is any other field quite as bad with this as software development seems to be?</text></comment>