<?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>Sadek Drobi's Blog &#187; clojure</title>
	<atom:link href="http://sadekdrobi.com/category/clojure/feed/" rel="self" type="application/rss+xml" />
	<link>http://sadekdrobi.com</link>
	<description>Sadek Drobi</description>
	<lastBuildDate>Tue, 08 Mar 2011 22:56:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Multimethod in Clojure: Should I call it first class Pattern Matching? or Pattern Matching in disguise?</title>
		<link>http://sadekdrobi.com/2009/05/27/multimethod-in-clojure-should-i-call-it-first-class-pattern-matching-or-pattern-matching-in-disguise/</link>
		<comments>http://sadekdrobi.com/2009/05/27/multimethod-in-clojure-should-i-call-it-first-class-pattern-matching-or-pattern-matching-in-disguise/#comments</comments>
		<pubDate>Wed, 27 May 2009 21:25:24 +0000</pubDate>
		<dc:creator>Sadache</dc:creator>
				<category><![CDATA[Multi-Paradigm Design]]></category>
		<category><![CDATA[Multi-languages projects]]></category>
		<category><![CDATA[Polyglot Programming]]></category>
		<category><![CDATA[clojure]]></category>

		<guid isPermaLink="false">http://sadekdrobi.com/2009/05/27/multimethod-in-clojure-should-i-call-it-first-class-pattern-matching-or-pattern-matching-in-disguise/</guid>
		<description><![CDATA[from Rich Hickey on Clojure&#8217;s Features and Implementation
Clojure multimethods are just another level of that same logic, in fact they are a realization of the last sentence I just said. They are dispatch based upon an arbitrary function of the arguments. You define a multimethod and you say &#8220;Here is a function of the arguments [...]]]></description>
			<content:encoded><![CDATA[<p>from <a href="http://www.infoq.com/interviews/hickey-clojure">Rich Hickey on Clojure&#8217;s Features and Implementation</a></p>
<blockquote><p>Clojure multimethods are just another level of that same logic, in fact they are a realization of the last sentence I just said. They are dispatch based upon an arbitrary function of the arguments. You define a multimethod and you say &#8220;Here is a function of the arguments I&#8217;d like you to use&#8221; You could look at the first argument, you could look at the 5th, you could look at all of them, you could look inside them, some member of an argument, it could look at the types or not or the values. Now, you could look at relationships between arguments, you have dispatch based upon an arbitrary function of the arguments and you have a vastly wider set of polymorphic possibilities than you had before and it&#8217;s quite powerful. In particular, it allows you to do Runtime dispatch on Runtime attributes. You don&#8217;t usually represent something like being hungry as part of something&#8217;s type, it&#8217;s some attribute that it acquires while the program is running or being outdated or things like that. Now you can access those things and you can do things polymorphically based upon that and take a lot of switch statements out of your code.</p>
</blockquote>
<p>Should I call it first class Pattern Matching? or Pattern Matching in disguise?</p>
]]></content:encoded>
			<wfw:commentRss>http://sadekdrobi.com/2009/05/27/multimethod-in-clojure-should-i-call-it-first-class-pattern-matching-or-pattern-matching-in-disguise/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

