Thanks, Minh. So are things like recursion and memory sharing typically out the window?<br>
<br>
Also, I don't see how thinking about type classes will help, without the benefits of polymorphism.<br>
<br>
-Chad<br><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">minh thu</b> <<a href="mailto:noteed@gmail.com">noteed@gmail.com</a>><br>Date: Jun 12, 2006 12:23 PM
<br>Subject: Re: [Haskell-cafe] Learning C after Haskell<br>To: Chad Scherrer <<a href="mailto:chad.scherrer@gmail.com">chad.scherrer@gmail.com</a>><br><br></span>hi,<br><br>C is very different from Haskell.<br>* you'lle have to manage explicitly memory de/allocation.
<br>* c programming is a bit like haskell io monad programming (but<br>without the functionnal part) :<br> you'lle use "=" in place of "<-" and the left hand side can be<br>reassigned multiple times.
<br>* imperative programming (c is imperative) involve states (a lot !).<br> (see how to write the equivalent of mapM print [1..10]);<br> imperative programmers use loops, not much recursion<br><br>* things you can keep in your mind : the way you organize things
<br>(module, type classes (but there is no polymorphism in c), have<br>functions and not a huge amount of code lines...), the way you use<br>self documenting names.<br><br>well, not sure it helps, but here you are :)<br>mt
<br><br><br>2006/6/12, Chad Scherrer <<a href="mailto:chad.scherrer@gmail.com">chad.scherrer@gmail.com</a>>:<br>> Ok, so I'm doing things somewhat backward. I've been using Haskell for a<br>> while now, whenever I get a chance to. But in order to become more involved
<br>> in high-performance computing projects at my work, I need to learn C.<br>><br>> I've heard a lot of people say that experience in Haskell can improve one's<br>> abilities in other languages, but I also wonder how different the C "way of
<br>> doing things" is different from Haskell's.<br>><br>> My question is, as I learn C, are there any particular Haskell concepts I<br>> should keep in the back of my mind, or is it better to approach C from
<br>> scratch?<br>><br>> Thanks in advance!<br>><br>> Preparing for a foot-shooting,<br>> Chad<br>><br>> _______________________________________________<br>> Haskell-Cafe mailing list<br>> <a href="mailto:Haskell-Cafe@haskell.org">
Haskell-Cafe@haskell.org</a><br>> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>><br>><br>><br><br clear="all"><br>-- <br><br>Chad Scherrer
<br><br>"Time flies like an arrow; fruit flies like a banana" -- Groucho Marx