<?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: A monad in C# for simplifying WPF multi-threading for a more responsive GUI</title>
	<atom:link href="http://sadekdrobi.com/2009/06/26/a-monad-in-c-for-simplifying-wpf-multi-threading-for-a-more-responsive-gui/feed/" rel="self" type="application/rss+xml" />
	<link>http://sadekdrobi.com/2009/06/26/a-monad-in-c-for-simplifying-wpf-multi-threading-for-a-more-responsive-gui/</link>
	<description>Sadek Drobi</description>
	<lastBuildDate>Mon, 02 Nov 2009 05:56:20 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jacob Stanley</title>
		<link>http://sadekdrobi.com/2009/06/26/a-monad-in-c-for-simplifying-wpf-multi-threading-for-a-more-responsive-gui/comment-page-1/#comment-20525</link>
		<dc:creator>Jacob Stanley</dc:creator>
		<pubDate>Mon, 02 Nov 2009 05:56:20 +0000</pubDate>
		<guid isPermaLink="false">http://sadekdrobi.com/?p=563#comment-20525</guid>
		<description>@Fabrice - The variable names are not as important as the types in this case. In my opinion, adding more verbose variable names makes this harder to understand. If you really want to know how it works you need to study monads in general.

Wes Dyer wrote a good article on this topic for C# programmers: http://blogs.msdn.com/wesdyer/archive/2008/01/11/the-marvels-of-monads.aspx</description>
		<content:encoded><![CDATA[<p>@Fabrice &#8211; The variable names are not as important as the types in this case. In my opinion, adding more verbose variable names makes this harder to understand. If you really want to know how it works you need to study monads in general.</p>
<p>Wes Dyer wrote a good article on this topic for C# programmers: <a href="http://blogs.msdn.com/wesdyer/archive/2008/01/11/the-marvels-of-monads.aspx" rel="nofollow">http://blogs.msdn.com/wesdyer/archive/2008/01/11/the-marvels-of-monads.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://sadekdrobi.com/2009/06/26/a-monad-in-c-for-simplifying-wpf-multi-threading-for-a-more-responsive-gui/comment-page-1/#comment-20519</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Mon, 02 Nov 2009 01:48:51 +0000</pubDate>
		<guid isPermaLink="false">http://sadekdrobi.com/?p=563#comment-20519</guid>
		<description>Im curious how this is distinct from Eric Meijer&#039;s Rx or First Class Events in F# (ie, Functional Reactive Programming)</description>
		<content:encoded><![CDATA[<p>Im curious how this is distinct from Eric Meijer&#8217;s Rx or First Class Events in F# (ie, Functional Reactive Programming)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sadache</title>
		<link>http://sadekdrobi.com/2009/06/26/a-monad-in-c-for-simplifying-wpf-multi-threading-for-a-more-responsive-gui/comment-page-1/#comment-20490</link>
		<dc:creator>Sadache</dc:creator>
		<pubDate>Sat, 31 Oct 2009 12:01:36 +0000</pubDate>
		<guid isPermaLink="false">http://sadekdrobi.com/?p=563#comment-20490</guid>
		<description>I agree that implementation code is not explicit for non FPs. But you do not need to understand the implementation to use the monad. Same thing as for Linq for lists. Did you go through their implementation before using them? The wide majority don&#039;t care...</description>
		<content:encoded><![CDATA[<p>I agree that implementation code is not explicit for non FPs. But you do not need to understand the implementation to use the monad. Same thing as for Linq for lists. Did you go through their implementation before using them? The wide majority don&#8217;t care&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fabrice</title>
		<link>http://sadekdrobi.com/2009/06/26/a-monad-in-c-for-simplifying-wpf-multi-threading-for-a-more-responsive-gui/comment-page-1/#comment-20489</link>
		<dc:creator>Fabrice</dc:creator>
		<pubDate>Sat, 31 Oct 2009 11:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://sadekdrobi.com/?p=563#comment-20489</guid>
		<description>&quot;code here is simplified for clarity&quot;
Not so sure about that.

I don&#039;t really understand what your code does, but when I see code like the this, I just want to run away:

View SelectMany(this View m, Func&lt;T, View&gt; k) { return () =&gt; k(m())(); }

What do U, T, m, and k mean?
If you want someone to use your code, you&#039;d better use explicit names.</description>
		<content:encoded><![CDATA[<p>&#8220;code here is simplified for clarity&#8221;<br />
Not so sure about that.</p>
<p>I don&#8217;t really understand what your code does, but when I see code like the this, I just want to run away:</p>
<p>View SelectMany(this View m, Func&lt;T, View&gt; k) { return () =&gt; k(m())(); }</p>
<p>What do U, T, m, and k mean?<br />
If you want someone to use your code, you&#8217;d better use explicit names.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob Stanley</title>
		<link>http://sadekdrobi.com/2009/06/26/a-monad-in-c-for-simplifying-wpf-multi-threading-for-a-more-responsive-gui/comment-page-1/#comment-18262</link>
		<dc:creator>Jacob Stanley</dc:creator>
		<pubDate>Sat, 15 Aug 2009 16:01:03 +0000</pubDate>
		<guid isPermaLink="false">http://sadekdrobi.com/?p=563#comment-18262</guid>
		<description>@Jonathan It&#039;s adorable that you think the LINQ syntax is only for querying collections :) It was deliberately implemented in a way that isn&#039;t tied to the list monad (IEnumerable) so that developers can use it in other useful ways.</description>
		<content:encoded><![CDATA[<p>@Jonathan It&#8217;s adorable that you think the LINQ syntax is only for querying collections :) It was deliberately implemented in a way that isn&#8217;t tied to the list monad (IEnumerable) so that developers can use it in other useful ways.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sadache</title>
		<link>http://sadekdrobi.com/2009/06/26/a-monad-in-c-for-simplifying-wpf-multi-threading-for-a-more-responsive-gui/comment-page-1/#comment-16526</link>
		<dc:creator>Sadache</dc:creator>
		<pubDate>Sun, 28 Jun 2009 22:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://sadekdrobi.com/?p=563#comment-16526</guid>
		<description>@Jonathan I don&#039;t know why you call this abusing. LinQ syntax is done to be used, it is a generic abstraction, a monadic syntax. WPF is a monad (continuation), so I don&#039;t know why you call it abusing...

So with your explanation, should the presenter call Dispatcher.Invoke? This breaks abstraction boundaries as the presenter is not supposed to know about such implementation details. The thread unsafety should be expressed in the type system same as nulls. And this solution gives an opportunity to deal with it more safely. In my case the presenter will need to know only about View&lt;IHelloWorld&gt; which is not a technology specific thing. More, I could implement a nice animation to be shown while working on another thread. 

I really do not understand how you call removing all the boilerplate unsafe code and using a far cleaner syntax a stupid idea? Maybe you need to think about the practical advantages of the approach instead of criticizing MVP and my interpretation of it. 

WPF monad let the user focus on interesting business stuff rather than the unintuitive signature of Invoke method!</description>
		<content:encoded><![CDATA[<p>@Jonathan I don&#8217;t know why you call this abusing. LinQ syntax is done to be used, it is a generic abstraction, a monadic syntax. WPF is a monad (continuation), so I don&#8217;t know why you call it abusing&#8230;</p>
<p>So with your explanation, should the presenter call Dispatcher.Invoke? This breaks abstraction boundaries as the presenter is not supposed to know about such implementation details. The thread unsafety should be expressed in the type system same as nulls. And this solution gives an opportunity to deal with it more safely. In my case the presenter will need to know only about View<ihelloworld> which is not a technology specific thing. More, I could implement a nice animation to be shown while working on another thread. </p>
<p>I really do not understand how you call removing all the boilerplate unsafe code and using a far cleaner syntax a stupid idea? Maybe you need to think about the practical advantages of the approach instead of criticizing MVP and my interpretation of it. </p>
<p>WPF monad let the user focus on interesting business stuff rather than the unintuitive signature of Invoke method!</ihelloworld></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Allen</title>
		<link>http://sadekdrobi.com/2009/06/26/a-monad-in-c-for-simplifying-wpf-multi-threading-for-a-more-responsive-gui/comment-page-1/#comment-16468</link>
		<dc:creator>Jonathan Allen</dc:creator>
		<pubDate>Sat, 27 Jun 2009 19:03:02 +0000</pubDate>
		<guid isPermaLink="false">http://sadekdrobi.com/?p=563#comment-16468</guid>
		<description>That is stupid. There are plenty of ways to marshall information between the GUI and background threads without absuing the LINQ syntax. If explicit marshalling is too painful, a simple background worker object will do nicely. I dread to think about the poor sobs who have to maintain a program in which queries have side-effects.

The fact that you are having problems with thread ownership means one of two things. Either the Model-View-Presentor pattern is fundementally flawed or your interpertation of it is. Using the more traditional forms over data pattern, we never see this problem. Background threads quitely work on the data objects, the &#039;model&#039; in MVC/MVP, and use events to notify the form that something has changed.

Design patterns are supposed to simplify things. If you find that they are making them more complicated, then don&#039;t use them.</description>
		<content:encoded><![CDATA[<p>That is stupid. There are plenty of ways to marshall information between the GUI and background threads without absuing the LINQ syntax. If explicit marshalling is too painful, a simple background worker object will do nicely. I dread to think about the poor sobs who have to maintain a program in which queries have side-effects.</p>
<p>The fact that you are having problems with thread ownership means one of two things. Either the Model-View-Presentor pattern is fundementally flawed or your interpertation of it is. Using the more traditional forms over data pattern, we never see this problem. Background threads quitely work on the data objects, the &#8216;model&#8217; in MVC/MVP, and use events to notify the form that something has changed.</p>
<p>Design patterns are supposed to simplify things. If you find that they are making them more complicated, then don&#8217;t use them.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
