<?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: Brief Intro to Pointers</title>
	<atom:link href="http://tleaves.com/2004/03/03/brief-intro-to-pointers/feed/" rel="self" type="application/rss+xml" />
	<link>http://tleaves.com/2004/03/03/brief-intro-to-pointers/</link>
	<description>Creativity x Technology</description>
	<lastBuildDate>Thu, 29 Jul 2010 04:37:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: peterb</title>
		<link>http://tleaves.com/2004/03/03/brief-intro-to-pointers/comment-page-1/#comment-150</link>
		<dc:creator>peterb</dc:creator>
		<pubDate>Fri, 10 Jun 2005 23:55:52 +0000</pubDate>
		<guid isPermaLink="false">http://tleaves.com/?p=41#comment-150</guid>
		<description>Ouch!  Nice catch.  I&#039;ve corrected the downloadable version.  Thanks.</description>
		<content:encoded><![CDATA[<p>Ouch!  Nice catch.  I&#8217;ve corrected the downloadable version.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://tleaves.com/2004/03/03/brief-intro-to-pointers/comment-page-1/#comment-149</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 10 Jun 2005 22:58:19 +0000</pubDate>
		<guid isPermaLink="false">http://tleaves.com/?p=41#comment-149</guid>
		<description>Good article. One issue though, the first code sample in the &quot;But Why&quot; section contains an error. The example in the article is correct, but the download version repeats val_incr in the print statement for the ref_incr function (See below). Took some head scratching to figure out...



void val_incr(int counter) {

  printf(&quot;val_incr: start, counter is %d\n&quot;, counter);

  counter++;

  printf(&quot;val_incr: exit, counter is %d\n&quot;, counter);

}



void ref_incr(int *counter) {

  printf(&quot;val_incr: start, counter is %d\n&quot;, *counter);

  (*counter)++;

  printf(&quot;val_incr: exit, counter is %d\n&quot;, *counter);

}</description>
		<content:encoded><![CDATA[<p>Good article. One issue though, the first code sample in the &#8220;But Why&#8221; section contains an error. The example in the article is correct, but the download version repeats val_incr in the print statement for the ref_incr function (See below). Took some head scratching to figure out&#8230;</p>
<p>void val_incr(int counter) {</p>
<p>  printf(&#8220;val_incr: start, counter is %d\n&#8221;, counter);</p>
<p>  counter++;</p>
<p>  printf(&#8220;val_incr: exit, counter is %d\n&#8221;, counter);</p>
<p>}</p>
<p>void ref_incr(int *counter) {</p>
<p>  printf(&#8220;val_incr: start, counter is %d\n&#8221;, *counter);</p>
<p>  (*counter)++;</p>
<p>  printf(&#8220;val_incr: exit, counter is %d\n&#8221;, *counter);</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Faisal N. Jawdat</title>
		<link>http://tleaves.com/2004/03/03/brief-intro-to-pointers/comment-page-1/#comment-148</link>
		<dc:creator>Faisal N. Jawdat</dc:creator>
		<pubDate>Fri, 05 Mar 2004 02:30:15 +0000</pubDate>
		<guid isPermaLink="false">http://tleaves.com/?p=41#comment-148</guid>
		<description>I&#039;d avoid the problem of teaching people addressing modes by just picking one form of assembler and sticking with it, probably on a &quot;not real&quot; processor.  If you&#039;re teaching people direct and dangerous memory management, you might as well admit you&#039;re playing towers of hanoi on a grand scale instead of trying to pretend you&#039;re using a high level language.</description>
		<content:encoded><![CDATA[<p>I&#8217;d avoid the problem of teaching people addressing modes by just picking one form of assembler and sticking with it, probably on a &#8220;not real&#8221; processor.  If you&#8217;re teaching people direct and dangerous memory management, you might as well admit you&#8217;re playing towers of hanoi on a grand scale instead of trying to pretend you&#8217;re using a high level language.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PZ Myers</title>
		<link>http://tleaves.com/2004/03/03/brief-intro-to-pointers/comment-page-1/#comment-147</link>
		<dc:creator>PZ Myers</dc:creator>
		<pubDate>Thu, 04 Mar 2004 20:13:36 +0000</pubDate>
		<guid isPermaLink="false">http://tleaves.com/?p=41#comment-147</guid>
		<description>Yeah, but when you start by learning assembler (like I did), you can&#039;t avoid learning the power of pointers, and all those addressing modes do weird things to your head that turn out to be fairly useful when programming.





The last three universities at which I worked all started their students with Scheme. I have no idea why.</description>
		<content:encoded><![CDATA[<p>Yeah, but when you start by learning assembler (like I did), you can&#8217;t avoid learning the power of pointers, and all those addressing modes do weird things to your head that turn out to be fairly useful when programming.</p>
<p>The last three universities at which I worked all started their students with Scheme. I have no idea why.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Prevost</title>
		<link>http://tleaves.com/2004/03/03/brief-intro-to-pointers/comment-page-1/#comment-146</link>
		<dc:creator>John Prevost</dc:creator>
		<pubDate>Thu, 04 Mar 2004 15:19:14 +0000</pubDate>
		<guid isPermaLink="false">http://tleaves.com/?p=41#comment-146</guid>
		<description>Modula-2?  Wow.  When I took the course, it was Common LISP.  The next year, I think I heard it was SML (and people wanted to kill), and then switched up to Java shortly after that.</description>
		<content:encoded><![CDATA[<p>Modula-2?  Wow.  When I took the course, it was Common LISP.  The next year, I think I heard it was SML (and people wanted to kill), and then switched up to Java shortly after that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterb</title>
		<link>http://tleaves.com/2004/03/03/brief-intro-to-pointers/comment-page-1/#comment-145</link>
		<dc:creator>peterb</dc:creator>
		<pubDate>Thu, 04 Mar 2004 12:44:13 +0000</pubDate>
		<guid isPermaLink="false">http://tleaves.com/?p=41#comment-145</guid>
		<description>Yeah, it&#039;s pretty clear that the C syntax for pointers is pretty horrible.  I was with you in your suggestions until you said &quot;...and assembler,&quot; because then you end up teaching the students 36 different CPU-specific addressing modes, which is the same thing as teaching them C&#039;s pointer syntax except now they have 36 different ways to blow their own feet off, instead of just 2.



I&#039;m pretty sure most Universities nowadays don&#039;t start with C, anyway, although I can&#039;t be sure, not being a student.  I heard that the data structures and algorithms course at CMU, which used to be taught in modula-2 (kill me) is now taught in java, which makes sense to me.</description>
		<content:encoded><![CDATA[<p>Yeah, it&#8217;s pretty clear that the C syntax for pointers is pretty horrible.  I was with you in your suggestions until you said &#8220;&#8230;and assembler,&#8221; because then you end up teaching the students 36 different CPU-specific addressing modes, which is the same thing as teaching them C&#8217;s pointer syntax except now they have 36 different ways to blow their own feet off, instead of just 2.</p>
<p>I&#8217;m pretty sure most Universities nowadays don&#8217;t start with C, anyway, although I can&#8217;t be sure, not being a student.  I heard that the data structures and algorithms course at CMU, which used to be taught in modula-2 (kill me) is now taught in java, which makes sense to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Faisal N. Jawdat</title>
		<link>http://tleaves.com/2004/03/03/brief-intro-to-pointers/comment-page-1/#comment-144</link>
		<dc:creator>Faisal N. Jawdat</dc:creator>
		<pubDate>Thu, 04 Mar 2004 12:24:49 +0000</pubDate>
		<guid isPermaLink="false">http://tleaves.com/?p=41#comment-144</guid>
		<description>The issue with pointers isn&#039;t pointers, it&#039;s C.  All programming languages have pointers of some sort (OK, all programming languages anybody uses for anything these days).  But C delivers pointers in a format carefully optimized for blowing your foot off.  I&#039;m starting to think that CS should be taught with LISP and asssembler, graduating to something with managed memory, and that C style memory management should be a 300 or 400 level course rather than basic instruction.  Either that or just force feed people the Boehm collector until they&#039;re old enough to know better.  Meanwhile, back in the real world, I hear Python&#039;s nice.</description>
		<content:encoded><![CDATA[<p>The issue with pointers isn&#8217;t pointers, it&#8217;s C.  All programming languages have pointers of some sort (OK, all programming languages anybody uses for anything these days).  But C delivers pointers in a format carefully optimized for blowing your foot off.  I&#8217;m starting to think that CS should be taught with LISP and asssembler, graduating to something with managed memory, and that C style memory management should be a 300 or 400 level course rather than basic instruction.  Either that or just force feed people the Boehm collector until they&#8217;re old enough to know better.  Meanwhile, back in the real world, I hear Python&#8217;s nice.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
