<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Aaron Feng: Lisp has no syntax.  Lisp has no parentheses.  Lisp as no lists.</title>
    <link>http://www.aaronfeng.com/articles/2008/04/27/lisp-has-no-syntax-lisp-has-no-parentheses-lisp-as-no-lists</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Adventures in software development</description>
    <item>
      <title>Lisp has no syntax.  Lisp has no parentheses.  Lisp as no lists.</title>
      <description>&lt;p&gt;Lisp is often viewed as strange in syntax and parentheses centric language that only thing it cares about is processing lists.  After all, the name is derived from LISt Processing (LISP).  But it couldn't be more wrong!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.informatimago.com/"&gt;Pascal Bourguignon&lt;/a&gt; has a great post on the lisp mailing explain why &lt;a href="http://groups.google.com/group/comp.lang.lisp/msg/6ec4dab4a8d57f6e"&gt;Lisp has no syntax.  Lisp has no parentheses.  Lisp as no lists&lt;/a&gt;.  For the lazy readers, who don't want to click on the link, I'll give a simple break down of the Bourguignon's post.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lisp has no syntax&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Anyone with knowledge of how a &lt;a href="http://en.wikipedia.org/wiki/Compiler"&gt;compiler&lt;/a&gt; works would know that the job of a parser is to create a parse tree.  The parser has knowledge of the syntax of the language so it can transform tokens from the source code into a tree structure.  The reason Lisp doesn't have a concrete syntax is because the source code is in parse tree syntax.  A parse tree can be represented in many formats.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lisp has no parentheses&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In lisp, a list is constructed by placing elements in the list between parentheses and leading the first parenthesis with a single quote.  For example '(a b c).  Internally lisp doesn't store or know anything about parentheses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lisp has no list&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lisp has no list type.  List is an abstraction on top of the CONS cells.  A CONS cell is equivalent to a node in a link list.  It has two pointers; one points to data and other points to the next node or nil.&lt;/p&gt;

&lt;p&gt;I've only covered each point superficially, but Bourguignon's post contains a lot more details.&lt;/p&gt;</description>
      <pubDate>Sun, 27 Apr 2008 23:49:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:ee2d81b5-fad6-4e8b-a8c6-cfa4cb571094</guid>
      <author>Aaron Feng</author>
      <link>http://www.aaronfeng.com/articles/2008/04/27/lisp-has-no-syntax-lisp-has-no-parentheses-lisp-as-no-lists</link>
      <category>programming</category>
    </item>
  </channel>
</rss>

