<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bloggo ergo sum &#187; C++</title>
	<atom:link href="http://bloggoergosum.com/tag/cpp/feed/" rel="self" type="application/rss+xml" />
	<link>http://bloggoergosum.com</link>
	<description></description>
	<lastBuildDate>Sun, 14 Mar 2010 21:13:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Picking up a Lisp</title>
		<link>http://bloggoergosum.com/2008/04/13/picking-up-a-lisp/</link>
		<comments>http://bloggoergosum.com/2008/04/13/picking-up-a-lisp/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 22:46:29 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Lisp]]></category>

		<guid isPermaLink="false">http://bloggoergosum.us/?p=305</guid>
		<description><![CDATA[I&#8217;ve recently gone back to learning Lisp. I used it a little bit in graduate school to do some homework assignments in one of my algorithms class and learned some of the basics there, but since I started my professional &#8230; <a href="http://bloggoergosum.com/2008/04/13/picking-up-a-lisp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently gone back to learning Lisp.  I used it a little bit in graduate school to do some homework assignments in one of my algorithms class and learned some of the basics there, but since I started my professional career, I haven&#8217;t gone back to it at all until now.  I got Paul Graham&#8217;s book <em>On Lisp</em> and have made my way through several chapters, and it&#8217;s quite enjoyable.  </p>
<p>One thing I keep noticing is how similar Lisp and C++ are.  Many Lispers, of course, would regard this as heresy, but to me it makes perfect sense.  For example, take this passage from the book:</p>
<blockquote><p>Many languages offer some form of macro, but Lisp macros are singularly powerful.  When a file of Lisp is compiled, a parser reads the source code and sends its output to the compiler.  Here&#8217;s the stroke of genius: the output of the parser consists of <em>lists of Lisp objects</em>.  With macros, we can manipulate the program while it&#8217;s in this intermediate form between parser and compiler.  If necessary, these manipulations can be very extensive.</p></blockquote>
<p>Of course, the two languages aren&#8217;t exactly the same in this regard.  C++ templates can&#8217;t be manipulated in the same way first-class C++ expressions can be; they are powerful, but really only give you full control over the type system.  Being able to say lots of things about types in C++ will get you a long way, but not as far as Lisp macros will get you.  Still, the similarities I think are striking, especially considering some of the newer techniques that have been discovered with C++ templates that let you go a bit beyond just the type system by doing some really obscure things with types.</p>
<p>A number of other similarities I think are significant; Lisp and C++ are the two languages with the best multi-paradigm support to which I&#8217;ve been exposed.  Lisp tends to tilt functional, while C++ tilts procedural, but they both support all the major programming paradigms to practical degrees (although, to be fair, it would be easier to write an entirely procedural and/or object-oriented program in Lisp than it would be to write and entirely functional program in C++).</p>
<p>Anyway, just blurting some thoughts out loud while reading <em>On Lisp</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bloggoergosum.com/2008/04/13/picking-up-a-lisp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
