<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Pattern Matching In Clojure</title>
	<atom:link href="http://www.brool.com/index.php/pattern-matching-in-clojure/feed" rel="self" type="application/rss+xml" />
	<link>http://www.brool.com/index.php/pattern-matching-in-clojure</link>
	<description>brool \brool\ (n.) : a low roar; a deep murmur or humming</description>
	<lastBuildDate>Wed, 16 Nov 2011 04:35:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: tim</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-114136</link>
		<dc:creator>tim</dc:creator>
		<pubDate>Thu, 18 Nov 2010 01:38:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-114136</guid>
		<description>@Morgon:  Ah, I hadn&#039;t thought about that.  I&#039;ll take a look at see if that&#039;s feasible.</description>
		<content:encoded><![CDATA[<p>@Morgon:  Ah, I hadn&#8217;t thought about that.  I&#8217;ll take a look at see if that&#8217;s feasible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morgon Kanter</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-114046</link>
		<dc:creator>Morgon Kanter</dc:creator>
		<pubDate>Wed, 17 Nov 2010 05:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-114046</guid>
		<description>Very nice. I like this way better than Matchure; don&#039;t suppose there&#039;s any chance of getting it into clojure-contrib?</description>
		<content:encoded><![CDATA[<p>Very nice. I like this way better than Matchure; don&#8217;t suppose there&#8217;s any chance of getting it into clojure-contrib?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: [Project Euler Problem 4 Solution] Thanks God, Clojure exists!! &#171; Web life between Python and lambda calculus</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-113651</link>
		<dc:creator>[Project Euler Problem 4 Solution] Thanks God, Clojure exists!! &#171; Web life between Python and lambda calculus</dc:creator>
		<pubDate>Sat, 13 Nov 2010 17:46:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-113651</guid>
		<description>[...] is a semi-trivial, not optimized solution to the problem 4 of Project Euler. Note: you need the pattern-match jar, a wonderful way to bring pattern matching into your Clojure functions. You can download it [...]</description>
		<content:encoded><![CDATA[<p>[...] is a semi-trivial, not optimized solution to the problem 4 of Project Euler. Note: you need the pattern-match jar, a wonderful way to bring pattern matching into your Clojure functions. You can download it [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: (fast) pattern matching in clojure &#171; Lost in Technology</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-91690</link>
		<dc:creator>(fast) pattern matching in clojure &#171; Lost in Technology</dc:creator>
		<pubDate>Wed, 10 Feb 2010 19:40:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-91690</guid>
		<description>[...] there already is a macro available for that purpose (see here), that implementation has some limitations which i tried to [...]</description>
		<content:encoded><![CDATA[<p>[...] there already is a macro available for that purpose (see here), that implementation has some limitations which i tried to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Today in the Intertweets (Feb 1st Ed) &#124; disclojure: all things clojure</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-91332</link>
		<dc:creator>Today in the Intertweets (Feb 1st Ed) &#124; disclojure: all things clojure</dc:creator>
		<pubDate>Tue, 02 Feb 2010 07:51:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-91332</guid>
		<description>[...] pattern matching (here, via @fogus) &#8212; This links to a rather old article on a pattern haskell-esque pattern matching [...]</description>
		<content:encoded><![CDATA[<p>[...] pattern matching (here, via @fogus) &#8212; This links to a rather old article on a pattern haskell-esque pattern matching [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikio Hokari</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-89735</link>
		<dc:creator>Mikio Hokari</dc:creator>
		<pubDate>Sun, 27 Dec 2009 13:31:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-89735</guid>
		<description>Very good work! Thank you!
clojure.contrib.types/match lacks &quot;&amp;&quot; clauses too.
(clojure.contrib.types/match                                                                                                                                                                                               
   [1 2 3 4] [head &amp; tail] (f head tail))
causes error.</description>
		<content:encoded><![CDATA[<p>Very good work! Thank you!<br />
clojure.contrib.types/match lacks &#8220;&amp;&#8221; clauses too.<br />
(clojure.contrib.types/match<br />
   [1 2 3 4] [head &amp; tail] (f head tail))<br />
causes error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Konrad Hinsen</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-84320</link>
		<dc:creator>Konrad Hinsen</dc:creator>
		<pubDate>Tue, 25 Aug 2009 12:26:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-84320</guid>
		<description>For a somewhat similar idea, see clojure.contrib.types/match:

  http://richhickey.github.com/clojure-contrib/types-api.html#types/match

This is a pattern-matching macro I wrote for working with algebraic data types, but it also knows about lists, vectors, and maps. The main feature that it lacks compared to your implementation is :when clauses.</description>
		<content:encoded><![CDATA[<p>For a somewhat similar idea, see clojure.contrib.types/match:</p>
<p>  <a href="http://richhickey.github.com/clojure-contrib/types-api.html#types/match" rel="nofollow">http://richhickey.github.com/clojure-contrib/types-api.html#types/match</a></p>
<p>This is a pattern-matching macro I wrote for working with algebraic data types, but it also knows about lists, vectors, and maps. The main feature that it lacks compared to your implementation is :when clauses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Faulhaber</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-83815</link>
		<dc:creator>Tom Faulhaber</dc:creator>
		<pubDate>Thu, 13 Aug 2009 18:02:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-83815</guid>
		<description>@tim; After thinking about it more, my opinion is fuzzier. :-) But I&#039;d leave it with the stripped down syntax for now, since you&#039;ve changed it and see how it feels after some more use.

The interesting question here is how often do things end up looking like conds with simple actions and how often do they look like funs with multiple arities. I was thinking the former (partially cause of the examples and some half-formed haskell in my head), but after musing on it, I&#039;m not as sure.</description>
		<content:encoded><![CDATA[<p>@tim; After thinking about it more, my opinion is fuzzier. :-) But I&#8217;d leave it with the stripped down syntax for now, since you&#8217;ve changed it and see how it feels after some more use.</p>
<p>The interesting question here is how often do things end up looking like conds with simple actions and how often do they look like funs with multiple arities. I was thinking the former (partially cause of the examples and some half-formed haskell in my head), but after musing on it, I&#8217;m not as sure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tim</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-83814</link>
		<dc:creator>tim</dc:creator>
		<pubDate>Thu, 13 Aug 2009 17:30:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-83814</guid>
		<description>@Tom:  Yah, I think you&#039;re right.  I tried it out locally and it felt cleaner and more clojurey (if that&#039;s a word).  Latest HEAD has the new stripped down syntax.  Thanks!

@fogus:  Thanks very much -- enjoy.  :-)
</description>
		<content:encoded><![CDATA[<p>@Tom:  Yah, I think you&#8217;re right.  I tried it out locally and it felt cleaner and more clojurey (if that&#8217;s a word).  Latest HEAD has the new stripped down syntax.  Thanks!</p>
<p>@fogus:  Thanks very much &#8212; enjoy.  :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fogus</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-83801</link>
		<dc:creator>fogus</dc:creator>
		<pubDate>Thu, 13 Aug 2009 12:31:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-83801</guid>
		<description>Excellent work.  This has been long in coming and I applaud you for the effort.  I know what I&#039;ll be playing with this afternoon.  :)

-m</description>
		<content:encoded><![CDATA[<p>Excellent work.  This has been long in coming and I applaud you for the effort.  I know what I&#8217;ll be playing with this afternoon.  :)</p>
<p>-m</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Faulhaber</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-83781</link>
		<dc:creator>Tom Faulhaber</dc:creator>
		<pubDate>Thu, 13 Aug 2009 01:35:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-83781</guid>
		<description>@Tim:

On 1, I think that my suggestion has the advantage of consistency with other Clojure forms. It seems that everywhere in Clojure that Rich had the choice he followed the &quot;single-layer model&quot; rather than the &quot;double-layer model&quot; (which is usually the choice in CL). condp is another example here. 

It would be nice if the match form (and the defnp form) felt as clojure-y as possible. The loss of the implicit do would be a small price to pay for that.

Tom</description>
		<content:encoded><![CDATA[<p>@Tim:</p>
<p>On 1, I think that my suggestion has the advantage of consistency with other Clojure forms. It seems that everywhere in Clojure that Rich had the choice he followed the &#8220;single-layer model&#8221; rather than the &#8220;double-layer model&#8221; (which is usually the choice in CL). condp is another example here. </p>
<p>It would be nice if the match form (and the defnp form) felt as clojure-y as possible. The loss of the implicit do would be a small price to pay for that.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tim</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-83779</link>
		<dc:creator>tim</dc:creator>
		<pubDate>Thu, 13 Aug 2009 00:58:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-83779</guid>
		<description>@Tom: 

1. Yah, I went back and forth on this too.  I eventually went with (pattern action) because a) it matches variable-arity function definitions and b) it allows for an implicit do-body for the actions (which I just realized doesn&#039;t work right now, but I&#039;ll fix that tonight).  That said, I&#039;m agnostic on the issue, and could be convinced one way or the other -- would reducing the parens in the default case make up for having to have an explicit (do ...) for the more complicated actions?

2. Oh, that&#039;s a great idea -- I&#039;ll take a look at that.</description>
		<content:encoded><![CDATA[<p>@Tom: </p>
<p>1. Yah, I went back and forth on this too.  I eventually went with (pattern action) because a) it matches variable-arity function definitions and b) it allows for an implicit do-body for the actions (which I just realized doesn&#8217;t work right now, but I&#8217;ll fix that tonight).  That said, I&#8217;m agnostic on the issue, and could be convinced one way or the other &#8212; would reducing the parens in the default case make up for having to have an explicit (do &#8230;) for the more complicated actions?</p>
<p>2. Oh, that&#8217;s a great idea &#8212; I&#8217;ll take a look at that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Faulhaber</title>
		<link>http://www.brool.com/index.php/pattern-matching-in-clojure/comment-page-1#comment-83776</link>
		<dc:creator>Tom Faulhaber</dc:creator>
		<pubDate>Thu, 13 Aug 2009 00:03:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.brool.com/?p=351#comment-83776</guid>
		<description>Wow, this is cool! I&#039;ve been meaning to write this myself for a while but never got to it.

Too small ideas/suggestions:

1) When writing Clojure, Rich wanted to reduce the number of parens (relative to Common Lisp), so 

(let ((var1 val1) 
       (var2 val2))
   ...)

became

(let [var1 val1
       var2 val2]
   ...)

and 

(cond 
   ((pred1 action1)
    (pred2 action2)))

became 

(cond
   (pred1 action1
    pred2 action2))

in a similar vein, it would seem to make sense for 

(match var
  (pat1 action1)
  (pat2 action2))

to be simplified to 

(match var 
  pat1 action1
  pat2 action2)

though you&#039;ll need to figure out exactly how best to express :when syntax.

2) This just screams out for a defnp like clojure.contrib.defnk:

(defnp signum
   0 0
   n :when (&lt; n 0) -1
   _ 1)</description>
		<content:encoded><![CDATA[<p>Wow, this is cool! I&#8217;ve been meaning to write this myself for a while but never got to it.</p>
<p>Too small ideas/suggestions:</p>
<p>1) When writing Clojure, Rich wanted to reduce the number of parens (relative to Common Lisp), so </p>
<p>(let ((var1 val1)<br />
       (var2 val2))<br />
   &#8230;)</p>
<p>became</p>
<p>(let [var1 val1<br />
       var2 val2]<br />
   &#8230;)</p>
<p>and </p>
<p>(cond<br />
   ((pred1 action1)<br />
    (pred2 action2)))</p>
<p>became </p>
<p>(cond<br />
   (pred1 action1<br />
    pred2 action2))</p>
<p>in a similar vein, it would seem to make sense for </p>
<p>(match var<br />
  (pat1 action1)<br />
  (pat2 action2))</p>
<p>to be simplified to </p>
<p>(match var<br />
  pat1 action1<br />
  pat2 action2)</p>
<p>though you&#8217;ll need to figure out exactly how best to express :when syntax.</p>
<p>2) This just screams out for a defnp like clojure.contrib.defnk:</p>
<p>(defnp signum<br />
   0 0<br />
   n :when (&lt; n 0) -1<br />
   _ 1)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

