<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left>Java sense (i.e. "cut out any feature that can't be 
understood in five minutes by a chimp")</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=344245212-27042007><FONT face=Arial 
color=#0000ff size=2>Got to love comments like this&nbsp;they 
are&nbsp;constructive, objective, mature and accurate. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=344245212-27042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=344245212-27042007><FONT face=Arial 
color=#0000ff size=2>Glad we have your expert opinion to give us the gospel. 
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=344245212-27042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=344245212-27042007><FONT face=Arial 
color=#0000ff size=2>Can I get an amen? How about&nbsp;a Hallelujah 
?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=344245212-27042007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=344245212-27042007><FONT face=Arial 
color=#0000ff size=2>Troy Taillefer Java chimpanzee</FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2></FONT><FONT 
face=Arial color=#0000ff size=2></FONT><BR>&nbsp;</DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> haskell-bounces@haskell.org 
[mailto:haskell-bounces@haskell.org] <B>On Behalf Of </B>Sebastian 
Sylvan<BR><B>Sent:</B> Thursday, April 26, 2007 1:27 PM<BR><B>To:</B> 
phiroc@free.fr<BR><B>Cc:</B> haskell@haskell.org<BR><B>Subject:</B> Re: 
[Haskell] Newbie: what are the advantages of Haskell?<BR></FONT><BR></DIV>
<DIV></DIV>(note to Haskellers: Yeah, I'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'll do this one 
first:<BR><BR></SPAN>
<DIV style="MARGIN-LEFT: 40px">What are the mysterious "side effects" 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't vary. "x=x+1" isn't valid in 
Haskell. This means, among other things, that functions always do the same thing 
given the same input (they can't depend on some mutable state changing value), 
which is great since you'll never get those "oh I forgot that I must first call 
foo before I call bar, or I'll get an error". This really is a HUGE win, since 
programming with state is unreasonably error-prone. I'm afraid it's next to 
impossible to convince anyone that this is true, unless they're willing to give 
it a serious try, though :-) <BR><BR>Null pointers are possible when you're 
dealing with C functions mostly. You don't use pointers in Haskell normally, 
only when you're interfacing with external C libraries etc.<BR><BR></SPAN>
<BLOCKQUOTE class=gmail_quote 
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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 "functional style" in another language is purity. Once 
purity is gone, it's gone! It can'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 "mental log" in your head for 
all possible execution paths ("in this branch x is equal to y plus w, and this 
pointer here is null in the other branch x is null and..."). For me I can quite 
literally *feel* "brain resources" 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 "mental log" 
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'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 "isn't almost unusable in a multithreaded setting" 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="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><BR>Aren't 
  Haskell'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. "cut out any feature that can't be understood in five 
minutes by a chimp"). Some things do take some effort to learn, but there is a 
huge payoff for it (it's really powerful!). But yeah, there might be plenty of 
folks who will never bother learning about them, and they won't understand your 
code. <BR>&nbsp;</DIV></DIV><BR><BR clear=all><BR>-- <BR>Sebastian 
Sylvan<BR>+44(0)7857-300802<BR>UIN: 44640862 </BODY></HTML>