<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Five-Dollar Words For Programmers, Part Three: Homoiconic</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/03/23/five-dollar-words-for-programmers-part-three-homoiconic.aspx</link><description>Jeff Atwood was kind enough to once more give me the shout-out in his blog the other day . Thanks Jeff! This inspires me to continue my series on five-dollar words for programmers. Here’s one that I only learned relatively recently, when I helped write</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Árboles de Expresiones</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/03/23/five-dollar-words-for-programmers-part-three-homoiconic.aspx#9525152</link><pubDate>Wed, 01 Apr 2009 06:58:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9525152</guid><dc:creator>Jad Engine Blog</dc:creator><description>&lt;p&gt;Ahora que ya hemos visto que es una expresi&amp;#243;n lambda podemos ver otra nueva caracter&amp;#237;stica mucho m&amp;#225;s&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9525152" width="1" height="1"&gt;</description></item><item><title>re: Five-Dollar Words For Programmers, Part Three: Homoiconic</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/03/23/five-dollar-words-for-programmers-part-three-homoiconic.aspx#9523809</link><pubDate>Tue, 31 Mar 2009 23:05:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9523809</guid><dc:creator>Pavel Minaev [MSFT]</dc:creator><description>&lt;p&gt;But, Eric, Common Lisp has a well fleshed-out OO system, and it not really FP-centric - at least most CL code that I've seen uses mutable state and imperative constructs (such as loops) heavily. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9523809" width="1" height="1"&gt;</description></item><item><title>Árboles de Expresiones</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/03/23/five-dollar-words-for-programmers-part-three-homoiconic.aspx#9521394</link><pubDate>Tue, 31 Mar 2009 07:18:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9521394</guid><dc:creator>Miemblogs</dc:creator><description>&lt;p&gt;Ahora que ya hemos visto que es una expresi&amp;#243;n lambda podemos ver otra nueva caracter&amp;#237;stica mucho m&amp;#225;s&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9521394" width="1" height="1"&gt;</description></item><item><title>Árboles de Expresiones</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/03/23/five-dollar-words-for-programmers-part-three-homoiconic.aspx#9521372</link><pubDate>Tue, 31 Mar 2009 07:03:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9521372</guid><dc:creator>Jad Engine Blog</dc:creator><description>&lt;p&gt;Ahora que ya hemos visto que es una expresi&amp;#243;n lambda podemos ver otra nueva caracter&amp;#237;stica mucho m&amp;#225;s&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9521372" width="1" height="1"&gt;</description></item><item><title>re: Five-Dollar Words For Programmers, Part Three: Homoiconic</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/03/23/five-dollar-words-for-programmers-part-three-homoiconic.aspx#9514784</link><pubDate>Fri, 27 Mar 2009 22:03:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9514784</guid><dc:creator>Thomas</dc:creator><description>&lt;P&gt;Hold on there. &amp;nbsp;What's so great about homoiconic? &amp;nbsp;It gives you lots of power -- to tie yourself into knots of un-manageable, un-maintainable, un-readable code. &amp;nbsp;And talk about security risks... &amp;nbsp;HUGE! &amp;nbsp;Ask yourself -- why isn't Lisp used in any major commercial setting? &amp;nbsp;Because making code -&amp;gt; data and data -&amp;gt; code creates huge pitfalls.&lt;/P&gt;
&lt;DIV class=yellowbox&gt;
&lt;P&gt;I would argue that there are many more reasons than that. A language is successful in a particular domain when it successfully models the processes and concepts in that domain. Business settings tend to&amp;nbsp;have a lot of concerns about processes, so it should not be surprising that procedural coding styles are important. Business settings tend to&amp;nbsp;be concerned about rapidly changing external state, so it should not be surprising that coding styles involving mutable global state are common.&amp;nbsp;Businesses tend to&amp;nbsp;manage human&amp;nbsp;scenarios by throwing&amp;nbsp;the&amp;nbsp;"hierarchy pattern" at&amp;nbsp;problems;&amp;nbsp;it should not be surprising that hierarchical object-oriented programs are common.&lt;/P&gt;
&lt;P&gt;Lisp can do all that of course, but&amp;nbsp;the fundamental metaphor that Lisp throws at every problem -- the&amp;nbsp;analysis of&amp;nbsp;lists by functions -- is a&amp;nbsp;far remove from the model world. In C# we deliberately make procedures, mutable properties, and the ability to explicitly model hierarchy all first-class concepts in the language right there for you to use.&lt;/P&gt;
&lt;P&gt;Though there certainly are pitfalls with homoiconicity, you can get yourself into even deeper morasses with C macros -- and many people do! The success of C speaks to the desirability of giving programmers "enough rope". You can't go denying people a tool just because some will misuse it horribly. But of course we want to make sure that the tools are designed to be easily used well, and designed specifically for real-world scenarios. -- Eric&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;And any coneptual advantages of of doing so pail in comparison to the problems caused. &amp;nbsp;Algol and Algol-derived languages have maintained that separation for very good reasons. &amp;nbsp;Just because something can be done, and because there may some academic symmetries in such a concept, doesn't mean it should be adopted. And just because programmers love to produce "cute" (if obtuse) code doesn't mean we should design commercial languages to cater to that anti-pattern. &amp;nbsp;Careful language design needs to take into consideration much broader concepts of usefulness and useability. &amp;nbsp;I think the C# team has done a pretty good job of maintaining that perspective.&lt;/P&gt;
&lt;DIV class=yellowbox&gt;
&lt;P&gt;Indeed. We're not interested in homoiconicity and metaprogramming because its cool (though it is.) We're interested in it because we have many customers whose fundamental use of C# involves in large part the automatic generation of more C#. Our existing code models are not strong enough to do all the tasks our customers would like them to do. -- Eric&lt;/P&gt;&lt;/DIV&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9514784" width="1" height="1"&gt;</description></item><item><title>re: Five-Dollar Words For Programmers, Part Three: Homoiconic</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/03/23/five-dollar-words-for-programmers-part-three-homoiconic.aspx#9511764</link><pubDate>Thu, 26 Mar 2009 22:42:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9511764</guid><dc:creator>Matthew Kane</dc:creator><description>&lt;p&gt;So XSLT is homoiconic and Judy Garland isn't? Go figure.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9511764" width="1" height="1"&gt;</description></item><item><title>re: Five-Dollar Words For Programmers, Part Three: Homoiconic</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/03/23/five-dollar-words-for-programmers-part-three-homoiconic.aspx#9508572</link><pubDate>Thu, 26 Mar 2009 00:29:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9508572</guid><dc:creator>pminaev</dc:creator><description>&lt;p&gt;&amp;gt; It just wouldn't work in C# or any other Algol derived language.&lt;/p&gt;
&lt;p&gt;As stated above by others, there are counterexamples of that, such as Nemerle (which is pretty close to C# syntactically all in all). &lt;/p&gt;
&lt;p&gt;BTW, Microsoft hasn't yet _released_ F# :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9508572" width="1" height="1"&gt;</description></item><item><title>re: Five-Dollar Words For Programmers, Part Three: Homoiconic</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/03/23/five-dollar-words-for-programmers-part-three-homoiconic.aspx#9508555</link><pubDate>Thu, 26 Mar 2009 00:22:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9508555</guid><dc:creator>Andrew</dc:creator><description>&lt;p&gt;The macros in Scheme (and Lisp) only work because of the beautifully regular syntax, code is data and data is code. It just wouldn't work in C# or any other Algol derived language. It's amazing to think that over 50 years ago when Lisp was created, it was a near perfect language and hasn't been bettered since. &lt;/p&gt;
&lt;p&gt;Here's a radical suggestion but if you want these capabilities to set your creative skills free then why not simply learn Scheme. There is an explosion of interest in Scheme at the moment and it is rapidly edging towards the mainstream. Even Microsoft has woken up to functional languages and has released F#.&lt;/p&gt;
&lt;p&gt;The more of us that create libraries for Scheme, the more everyone else can use it for real projects instead of the flawed languages we are forced to earn a living with.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9508555" width="1" height="1"&gt;</description></item><item><title>re: Five-Dollar Words For Programmers, Part Three: Homoiconic</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/03/23/five-dollar-words-for-programmers-part-three-homoiconic.aspx#9508551</link><pubDate>Thu, 26 Mar 2009 00:21:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9508551</guid><dc:creator>pminaev</dc:creator><description>&lt;p&gt;&amp;gt; Whenever somebody on the C# team talks about these features, it's like &amp;quot;this is so far into the future&amp;quot; mixed with &amp;quot;in ye olden times, mysterious languages like LISP could do that&amp;quot;. &amp;nbsp;Yet, Boo can do all of this, now. &lt;/p&gt;
&lt;p&gt;Solving a problem here and now is often not hard. Ensuring that it is solved correctly is harder, and ensuring that it it solved in such a way that it does not create a lot of pain in the future is harder still.&lt;/p&gt;
&lt;p&gt;If you've been tracking the design of C#, you know that a lot of seemingly innocuous language features are there for very deep reasons. A good (and relatively well-known) example of that are method overloading rules in presence of inheritance, but I keep stumbling into more and more even years later since I've first wrote a line of C# code, and it never ceases to amaze me. The level of design effort that went into the language is truly outstanding, even despite the occasional blunders (*cough* array covariance *cough*).&lt;/p&gt;
&lt;p&gt;This all has its price. You can't just say, &amp;quot;oh I've seen this neat thing in Boo (or Nemerle, or whatever), let's do the same!&amp;quot;. Consider that the designers will have to seat down and carefully analyze the requirements and the suggested approach, determining whether it is even the best way to go about the problem (remember, once you do it and release it, you'll have to support it!); looking for potential corner cases and pitfalls (Sam Ng's series on some corner cases of &amp;quot;dynamic&amp;quot; was very illuminating in that respect); finding reasonable solutions to all those; etc. The solution, should any be arrived to, has to be formalized in an unambiguous way for inclusion into the language spec.&lt;/p&gt;
&lt;p&gt;This doesn't end here, however. You have to test the feature - that means devising tests for maximum coverage (including all those corner cases!) and implementing them. Then there's IDE - you'd want your code completion, and refactoring, and on-the-fly error highlighting, and debugger support, for all the new stuff, wouldn't you? Finally, documentation - a series of articles on the core feature itself, API reference, a number of how-tos and examples for all of the above...&lt;/p&gt;
&lt;p&gt;Now consider the reach and magnitude of the metaprogramming feature, and think about how long each stage of the process outlined above would take. I think it would probably be more involved than LINQ... (and I was really quite surprised by how many new language features were squeezed into Orcas release, considering the time frame).&lt;/p&gt;
&lt;p&gt;And, of course, it's not like metaprogramming is the only feature request for future C# versions, and probably not even the most popular one - just go to Connect and search for C# feature suggestions...&lt;/p&gt;
&lt;p&gt;If we get that in C# 5, it will be wonderful. But I'm not holding my breath for it. It looks like too big of a fish for now.&lt;/p&gt;
&lt;p&gt;Me, I'll consider myself happy if I get &amp;quot;readonly class&amp;quot; and syntactic sugar for CodeContract :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9508551" width="1" height="1"&gt;</description></item><item><title>re: Five-Dollar Words For Programmers, Part Three: Homoiconic</title><link>http://blogs.msdn.com/b/ericlippert/archive/2009/03/23/five-dollar-words-for-programmers-part-three-homoiconic.aspx#9508447</link><pubDate>Wed, 25 Mar 2009 23:52:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9508447</guid><dc:creator>Robert</dc:creator><description>&lt;p&gt;Why not implement a Common Lisp.Net like clojure? Not a toy like ironscheme, but a real supported implementation. You will never get away from ASTs, so why not just use lisp.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9508447" width="1" height="1"&gt;</description></item></channel></rss>