(note to Haskellers: Yeah, I&#39;m handwaving things here, no need to point out counter-examples to my generalisations!)<br><br><div><span class="gmail_quote">On 4/26/07, <b class="gmail_sendername"><a href="mailto:phiroc@free.fr">
phiroc@free.fr</a></b> &lt;<a href="mailto:phiroc@free.fr">phiroc@free.fr</a>&gt; wrote:<br>We&#39;ll do this one first:<br><br></span><div style="margin-left: 40px;">What are the mysterious &quot;side effects&quot; which are avoided by using Haskell, which
<br>everyone talks about? Null pointers?<br></div><span class="gmail_quote"><br>Side effects are usually things like mutable state. In Haskell variables don&#39;t vary. &quot;x=x+1&quot; isn&#39;t valid in Haskell. This means, among other things, that functions always do the same thing given the same input (they can&#39;t depend on some mutable state changing value), which is great since you&#39;ll never get those &quot;oh I forgot that I must first call foo before I call bar, or I&#39;ll get an error&quot;. This really is a HUGE win, since programming with state is unreasonably error-prone. I&#39;m afraid it&#39;s next to impossible to convince anyone that this is true, unless they&#39;re willing to give it a serious try, though :-)
<br><br>Null pointers are possible when you&#39;re dealing with C functions mostly. You don&#39;t use pointers in Haskell normally, only when you&#39;re interfacing with external C libraries etc.<br><br></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>what are the advantages of haskell over semi-functional programming languages<br>such as Perl, Common Lisp, etc.?</blockquote><div><br>For me? Purity. I mean you can get plenty of the benefits of FP in any old language (witness C# 
3.0), but the one thing you can never get by just adding support for a &quot;functional style&quot; in another language is purity. Once purity is gone, it&#39;s gone! It can&#39;t be retrofitted on an existing language.<br>
<br>Purity is great because it makes it much easier to write programs without making silly mistakes. When writing programs in languages with lots of side effects you have to sort of keep a &quot;mental log&quot; in your head for all possible execution paths (&quot;in this branch x is equal to y plus w, and this pointer here is null in the other branch x is null and...&quot;). For me I can quite literally *feel* &quot;brain resources&quot; being freed up when using Haskell, which I can use to get stuff done quicker (or probably more accurate: I can feel how much brainpower I waste on book keeping and keeping track of this &quot;mental log&quot; when using languages like C++).
<br><br>Also purity is very interesting when you want to paralellize programs (a pure function can be executed on any thread, at any time, and its guaranteed to never interfer with the computation of other functions -- in impure languages this doesn&#39;t hold at all!). This is probably the killer app for functional programming IMO. FP is cool for a number of reasons, but I think &quot;isn&#39;t almost unusable in a multithreaded setting&quot; is what sets it apart the most from imperative languages.
<br><br>Haskell also has STM which is great for that low level shared state concurrency that you sometimes need (no locks, monitors, or any of that non-composable, insanity-inducing, messiness!)<br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Aren&#39;t Haskell&#39;s advantages outweighed by its complexity (Monads, etc.) and<br>rigidity?</blockquote><div><br>I can sometimes feel that Haskell looses out on not being user friendly in the Java sense (i.e. &quot;cut out any feature that can&#39;t be understood in five minutes by a chimp&quot;). Some things do take some effort to learn, but there is a huge payoff for it (it&#39;s really powerful!). But yeah, there might be plenty of folks who will never bother learning about them, and they won&#39;t understand your code.
<br>&nbsp;</div></div><br><br clear="all"><br>-- <br>Sebastian Sylvan<br>+44(0)7857-300802<br>UIN: 44640862