<div class="gmail_quote">On Tue, Apr 14, 2009 at 9:24 AM, Cristiano Paris <span dir="ltr">&lt;<a href="mailto:frodo@theshire.org">frodo@theshire.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Tue, Apr 14, 2009 at 5:09 PM, Luke Palmer &lt;<a href="mailto:lrpalmer@gmail.com">lrpalmer@gmail.com</a>&gt; wrote:<br>
&gt; ...<br>
<div class="im">&gt; Please don&#39;t say that.  He&#39;s a beginner.<br>
&gt; You realize that the path of least resistance will be to use it, right?<br>
&gt; You see why that&#39;s not a good thing?<br>
&gt; Even experts don&#39;t use this function.<br>
&gt; (To the O.P.:  don&#39;t use it)<br>
<br>
</div>Mmmh, sorry Luke but I don&#39;t understand this ostracism.<br>
<br>
unsafePerformIO is not &quot;evil&quot; by itself, it&#39;s there for a purpose and,<br>
as for anything else in the language, it&#39;s better to understand when<br>
to use it and when not rather than just knowing that is something that<br>
MUST not be used, without any further explanation.</blockquote><div><br></div><div>You have a point.  I would like to avoid introducing unfounded authoritarian stigmas whenever possible.</div><div><br></div><div>However, the way I see it is that unsafePerformIO *is* evil by itself, and it is only by the addition of Holy Water that it is benign to use. </div>
<div><br></div><div>Ryan Ingram described it as a way to achieve &quot;RTS extensions&quot;, which I think is a fine way to put it   I consider Debug.Trace to be an instance of this: we are extending the RTS to provide execution traces.</div>
<div><br></div><div>I guess it&#39;s a teaching style thing.  Mostly, if someone sees &quot;I have an IO [XmlTree] and I need an [XmlTree]&quot;, I want the &quot;I&#39;m asking the wrong question&quot; synapse path to fire, rather than the &quot;just use unsafePerformIO&quot; one.</div>
<div><br></div><div>Luke</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
More, from my personal experience, knowing unsafePerformIO helped me<br>
understand better what Monads are and how they should be used.<br>
<br>
I wounder what so-called &quot;experts&quot; have to say about this.<br>
<font color="#888888"><br>
Cristiano<br>
</font></blockquote></div><br>