<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Comment Feed for Channel 9 - C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem/RSS"></atom:link>
	<image>
		<url>http://ecn.channel9.msdn.com/o9/previewImages/100/563672_100x75.jpg</url>
		<title>Channel 9 - C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<link></link>
	</image>
	<description>&amp;quot;The Expression Problem is a new name for an old problem. The goal is to define a datatype by cases, where one can add new cases to the datatype and new functions over the datatype, without recompiling existing code, and while retaining static type
 safety (e.g., no casts).&amp;quot; - Philip WadlerWelcome to another series of&amp;nbsp;C9 Lectures covering

functional programming. For this series,&amp;nbsp;Dr. Ralf L&#228;mmel has generously taken the time to produce videos for Channel 9 from his office at the University
 of Koblenz-Landau (Germany), where he is a professor of computer science. The idea here is to take the next step from Erik Meijer&#39;s fantastic introductory series on functional programming. Accordingly, Ralf&#39;s series will dive into more advanced areas of functional
 programming, again focusing on the Haskell language (the functional concepts here span beyond any one functional language, however).To begin, Dr.&amp;nbsp;L&#228;mmel teaches us about the 
Expression Problem. Now put on your thinking&amp;nbsp;caps, make yourself comfortable, and enjoy this installment of functional programming lectures on Channel 9. Huge thanks to Dr. L&#228;mmel, both for doing this series for Channel 9 and for filming and producing it
 all&amp;nbsp;by himself! Finally, thanks to&amp;nbsp;Erik Meijer for suggesting this series and putting me in touch with Ralf.See Dr. L&#228;mmel&#39;s blog post about the new lecture series here:&amp;nbsp;http://professor-fish.blogspot.com/2010/08/lecture-series-on-advanced-functional.html
[Homework assignment is on slide 26 - 
Get the slides] </description>
	<link></link>
	<language>en</language>
	<pubDate>Sat, 25 May 2013 03:48:41 GMT</pubDate>
	<lastBuildDate>Sat, 25 May 2013 03:48:41 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<item>
		<title>Re: C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<description>
			<![CDATA[
<p>The Expression Problem. That reminds me of this paper</p>
<p>&nbsp;</p>
<p><strong><a href="http://www.comlab.ox.ac.uk//files/2187/ModularVisitor.pdf">Modular Visitor Components: A Practical Solution to the Expression Families Problem</a></strong><br />by&nbsp;<a class="ext" href="http://www.comlab.ox.ac.uk/people/Bruno.Oliveira/">Bruno C. d. S. Oliveira</a>,&nbsp;<a class="ext" href="http://www.comlab.ox.ac.uk/">Oxford University Computing Laboratory</a><br /><a class="ext" href="http://ecoop09.disi.unige.it/">ECOOP 2009</a>, Genova, Italy, July 2009.</p>
<p>&nbsp;</p>
<p>I guess the expression of the Expression Problem solution is simpler in Haskell!?</p>
<p>&nbsp;</p>
<p>I like the way you introduce all non-solutions first. Quite educational.</p>
<p>posted by exoteric</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634170628710000000</link>
		<pubDate>Tue, 10 Aug 2010 18:47:51 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634170628710000000</guid>
		<dc:creator>exoteric</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<description>
			<![CDATA[
<p>Nice lecture. <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></p>
<p>&nbsp;</p>
<p>For those who're interested, Ralf Lämmel has some older great lectures online <a href="http://www.uni-koblenz.de/~laemmel/paradigms0910/">
here</a>. Of these, I enjoyed the following lectures:</p>
<ul>
<li><a href="http://www.uni-koblenz.de/~laemmel/paradigms0910/resources/denotational2.html">Continuation Style</a>
</li><li><a href="http://www.uni-koblenz.de/~laemmel/paradigms0910/resources/denotational3.html">Fixed Point Theory</a>
</li><li><a href="http://www.uni-koblenz.de/~laemmel/paradigms0910/resources/oo.html">Object Encoding in Haskell</a>
</li></ul>
<p>&nbsp;They are great for exercising your brain. <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></p>
<p>posted by ShinNoNoir</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634170680410000000</link>
		<pubDate>Tue, 10 Aug 2010 20:14:01 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634170680410000000</guid>
		<dc:creator>ShinNoNoir</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<description>
			<![CDATA[
<p>In Javascript you could just add new functions to the object's prototypes. Objective-C has a similar ability to extend classes at runtime because like Javascript it uses dynamic dispatch.</p>
<p>&nbsp;</p>
<p>In C# you could simulate dynamic dispatch by having your visitor pattern function retrieve a delegate from a map that's keyed on type and operation.
</p>
<p>&nbsp;</p>
<p>I'd like to know if this Expression Problem shows up in practice or whether it's just a theoretical curiosity. The only situations I can think of where you want to extend something you don't have the source to are all data extensions - e.g. adding controls
 to a GUI toolkit. </p>
<p>posted by rhm</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634170732910000000</link>
		<pubDate>Tue, 10 Aug 2010 21:41:31 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634170732910000000</guid>
		<dc:creator>rhm</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<description>
			<![CDATA[
<p>Thanks for the reference. This is one of these really uber-smart papers on the expression problem &amp; friends. There is no shortage of such papers. <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /> I remember being a guest at North-Eastern in Boston a bit more than 3 years back where I also ran into Matthias
 Felleisen (a (F)PL highness) and we came to talk about the xproblem, which is when he made a funny remark along the lines (modulo my recollection): &quot;every PL researcher has written at least one paper on the xproblem&quot;.</p>
<p>&nbsp;</p>
<p>And yes, Haskell's type-class-based solution is pretty simple. Well, you can judge for yourself if you see the next lecture.</p>
<p>&nbsp;</p>
<p>posted by user42</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634170908120000000</link>
		<pubDate>Wed, 11 Aug 2010 02:33:32 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634170908120000000</guid>
		<dc:creator>user42</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<description>
			<![CDATA[
<p>I am flattered by your recommendation.</p>
<p>Frankly, I hope I can do better than in those 3 lectures that you recommend.</p>
<p>That is, in this new series, I want to specifically reach out to niners.</p>
<p>In contrast, some parts of these recommended lectures are a bit esoteric in retrospect, no?</p>
<p>&nbsp;</p>
<p>posted by user42</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634170913240000000</link>
		<pubDate>Wed, 11 Aug 2010 02:42:04 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634170913240000000</guid>
		<dc:creator>user42</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<description>
			<![CDATA[
<div>
<p>[ Sigh, meant to reply to rhm. ]</p>
<p>&nbsp;</p>
<p>Yes, I have totally avoided the entire wormhole/theme of runtime adaptation. Such expressiveness can be surely used in wonderful ways. Dynamic typing is Ok <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /> With Robert Hirschfeld, I have used Smalltalk (Squeak) to solve the expression problem in related
 and crazy ways:&nbsp;<a href="http://homepages.cwi.nl/~ralf/rd/">http&#58;&#47;&#47;homepages.cwi.nl&#47;&#126;ralf&#47;rd&#47;</a> (Readers of this reply with static typomania must not follow this link.)&nbsp;</p>
<p>&nbsp;</p>
<p>As you notice, my formulation of the xproblem (based on Wadler's original formulation) commits to static type safety (and separate compilation). Hence, your options (i.e., Javascript, maps in C#, dynamic dispatch in Objective C and elsewhere) would be wonderful
 candidates to add to the list of non-solutions that are already in the slide deck.</p>
<p>&nbsp;</p>
<p>I am really intrigued by your question whether the &quot;Expression Problem shows up in practice or whether it's just a theoretical curiosity&quot;.</p>
<p>&nbsp;</p>
<p>You seem to suggest one scenario: adding controls to a GUI toolkit. I believe that this is a non-challenge though because any additional control should be like a *data* extension and that's easy with OO. &nbsp;Please let me know whether you had an operation extension
 in mind (and which it is) in this context.</p>
<p>&nbsp;</p>
<p>Anyway, there is no easy answer to your question. This would be a very interesting question for a panel. Let me throw in some ideas here. a) The xproblem doesn't really show up in practice because there is no easy solution to it, and hence people regularly
 and naturally compromise on either separate compilation or static type safety. b) I feel somewhat hesitant to even name any practical scenario in support of the need for operation extensions in OO software because *any* scenario will do where you start from
 n virtual methods and you go to n&#43;m virtual methods, which seems to be a very reasonable thing to do in OO programming. <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /> c) Like with any form of anticipated adaptation (i.e., with the xproblem anticipating additional data variants and additional operations),
 practice often requires software evolution such that any effort of anticipation turns out to be insufficient. For instance, in the case of the expression language, we may need to refactor expression forms prior to an addition of a new expression form, which
 immediately takes us out of the xproblem's anticipation scheme for separate compilation and static type safety. d) The kind of the xproblem's discussion of separate compilation and static type safety is a precursor to very practical problems in software engineering---such
 as efficient test-harness execution following local changes and impact analysis; (non-) solutions to the xproblem do not co-solve those practical problems, but they help in mining those latter solutions. e) Your question seems to be focusing on the OO paradigm's
 situation. In the FP paradigm, it is a very practical limitation that we cannot do data extensions easily; we&nbsp;</p>
<p>certainly do operation extensions *all* the time.</p>
<p>&nbsp;</p>
<p>To summarize, given current practice and current language support, the xproblem is more of a theoretical curiosity, but it is interesting in the same sense, as we like to ponder about the Halting problem while we have practical means of gaining confidence
 in the termination of our algorithms.&nbsp;</p>
</div>
<p>posted by user42</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634170946320000000</link>
		<pubDate>Wed, 11 Aug 2010 03:37:12 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634170946320000000</guid>
		<dc:creator>user42</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<description>
			<![CDATA[
<p>Interested parties should read:&nbsp;<a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.96.5386">http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.96.5386</a>&nbsp;</p>
<p>It's a short paper showing a true OO solution to the expression problem using virtual classes and is written in easily understandable terms.</p>
<p><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.96.5386"></a></p>
<p><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.96.5386"></a></p>
<p><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.96.5386"></a></p>
<p>posted by KimBirkelund</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634171004500000000</link>
		<pubDate>Wed, 11 Aug 2010 05:14:10 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634171004500000000</guid>
		<dc:creator>KimBirkelund</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<description>
			<![CDATA[
<p>Well, yeah, they might be a bit esoteric... but imho there's nothing wrong with that. <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></p>
<p>posted by ShinNoNoir</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634171018270000000</link>
		<pubDate>Wed, 11 Aug 2010 05:37:07 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634171018270000000</guid>
		<dc:creator>ShinNoNoir</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<description>
			<![CDATA[
<p>The expression problem is my touchstone for thinking about a lot of design problems, and the tradeoffs and tensions involved. OO vs. FP, Rich vs. Reach, Code vs. Data ... I find it comes up over and over again in different forms. So I think every programmer
 should be familiar with the basic concept, thank you for posting this!</p>
<p>posted by contextfree`</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634171355880000000</link>
		<pubDate>Wed, 11 Aug 2010 14:59:48 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634171355880000000</guid>
		<dc:creator>contextfree`</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<description>
			<![CDATA[
<p>Nice.</p>
<p>&nbsp;</p>
<p>Would be even better if</p>
<p>- it would use F#</p>
<p>- F# would give us Type-Classes</p>
<p>&nbsp;</p>
<p>So PLEASE give us Type-Classes for the next release of F# - I guess it would have to be implemented into the CLR but after all we got generics, extension-methods etc. only for LINQ - so why not give us some nice functional sugar ? <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif' alt='Wink' /></p>
<p>posted by CbrAInK</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634175745210000000</link>
		<pubDate>Mon, 16 Aug 2010 16:55:21 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634175745210000000</guid>
		<dc:creator>CbrAInK</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<description>
			<![CDATA[
<p>I am in no way informed or authorized to speak about F#/CLR/C# plans with regard to type class-like stuff.</p>
<p>&nbsp;</p>
<p>But let me bring up some thoughts anyway.</p>
<p>&nbsp;</p>
<p>a) One would probably want to get type classes in .NET as a generalization of interfaces---as opposed to adding type classes as a whole new language concept.</p>
<p>b) If so, the retroactive property of type classes would deeply affect the runtime semantics of method calls with interface types. That is, implementations would need to be found either in the regular method table or in the pool of the retroactive interface
 implementation. So the CLR shall be affected.</p>
<p>c) b) implies a whole wormhole of issues with backwards bytecode compatibility and performance penalties (distributed fat) as well as more complicated type-checking scheme subject to runtime/loadtime tests. As Stefan Wehr's thesis seems to show, these problems
 can be probably solved, but it would be quite a brain surgery to get it to production quality.</p>
<p>d) There is also still design issues that are not totally clear. Let me just mention the example that not even in Haskell country we are totally decided on how to deal with type functions or type families or say multi-parameter type classes. Also, the transcription
 of type classes to OO brings up additional / new feature interactions that need to be worked out, e.g., the different kinds of polymorphism.</p>
<p>&nbsp;</p>
<p>I think my type-class lecture is going live tomorrow.</p>
<p>Let's chat some more ... <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></p>
<p>posted by user42</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634175932170000000</link>
		<pubDate>Mon, 16 Aug 2010 22:06:57 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634175932170000000</guid>
		<dc:creator>user42</dc:creator>
	</item>
	<item>
		<title>Re: C9 Lectures: Dr. Ralf L&#228;mmel - Advanced Functional Programming - The Expression Problem</title>
		<description>
			<![CDATA[
<p>Awesome to have you here, Ralf. Thank you.</p>
<p>&nbsp;</p>
<p>Indeed, tomorrow is Type Class Day. Thanks for another great lecture <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif' alt='Smiley' /></p>
<p>C</p>
<p>posted by Charles</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634176153710000000</link>
		<pubDate>Tue, 17 Aug 2010 04:16:11 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem#c634176153710000000</guid>
		<dc:creator>Charles</dc:creator>
	</item>
</channel>
</rss>