Meijer throws down!

Okay, not really. Saw this latest on LtU, regarding the recent JVM conference.  Erik Meijer was talking his recent work on the .Net Reactive Framework, and had this to say in passing:

And of course you say, “Erik, [why] are you making a big deal?  Category s–t like that.  The design pattern book fifty years ago mentioned these things [Iterator and Observer].”  The funny thing is that if you look in the back of the book at the related patterns, these two patterns are completely unrelated.  They are not even mentioned that they’re related.  Where as in reality these are super-duper related, right?  No two more interfaces on the planet, in the universe, are more intimately connected than these guys, because they’re connected by mathematics, ok.  And these guys — I think this book is crap — [audience laughter, nervous chuckling] I cannot trust these guys anymore

He’s kidding, about the GoF book being crap of course.  “Design Patterns: Elements of Reusable Object-Oriented Software”.  At least that’s my interpretation.  He’s just expecting more of the book — it defines, observes, studies, and documents 23 different software patterns, drawing up relations about the patterns based on in-the-wild observations of what patterns fraternize with which others.  And somehow this relationship between Iterator and Observer has just never come up!

I’ve been looking a lot at the Iterator pattern, the Observer/Visitor patterns, and Continuation Passing Style lately.  The relationships between these different patterns are fascinating — the latter especially, because you are able to switch freely between Iterator and Observer features with CPS, choosing the best features you want.  Well, not quite freely, because there’s a cost, in that different languages support different patterns to different degrees.  Especially in the case of CPS, some languages support it well (Ruby, Scheme, JavaScript), others with some moderate effort (C# 3.0 and later), and others require exorbitant effort and skill (C# 1.0, Python, C++).  Don’t get me wrong, I’m not bashing or especially holding high any particular language here — these are all languages I enjoy and prefer, but they have different strengths and, on this dimension, show great disparity in code readability and maintainability, for me and some peers.

So I’ve been thinking a lot about this divide, on such a fundamental abstraction as a sequence, and different behavioral modes it takes on.

Excellent talk, the portion available on youtube at least.  If you want more info on his work or Reactive Programming in general, it looks like MSDN channel 9 covered Erik on Reactive Programming back in July, so check that out.  Or check out Erik’s personal page on Microsoft Research with links to papers and talks on past and present research and application.

Edit add:

Saw this added on the LtU discussion and found it a good overview of Rx, from the unfold blog: http://themechanicalbride.blogspot.com/2009/07/introducing-rx-linq-to-events.html

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.