[Haskell-cafe] Why Haskell?

David F. Place d at vidplace.com
Sun Jul 23 07:51:06 EDT 2006

On Jul 23, 2006, at 1:20 AM, Matthew Bromberg wrote:

> I do want to understand the advantages of Haskell.  My approach has  
> been to consign the heavy imperative, state manipulating code to C  
> and leave the higher end stuff to Haskell.  The nature of my  
> problem  (a simulation) necessitates holding state for efficiency  
> reasons.  (e.g. I don't want to copy a 500 MB matrix every time I  
> change an entry.)  I assumed that Haskell would be easier to write  
> and perhaps maintain than the horrors of pure C.  At this point  
> there is no turning back. I will probably answer this question soon  
> enough.

Hi Matthew,

It seems that a lot of your issues stem from the design decision to  
implement a good chunk of your program in C.   There are certainly  
ways to implement an indexed data-structure in Haskell with good  
performance for persistent functional updates.  Alternatively, you  
could write imperative code in Haskell to update the array in place  
non-persistently.  So, the decision not to use Haskell for that part  
may be a case of premature optimization.

Cheers, David

David F. Place
mailto:d at vidplace.com

More information about the Haskell-Cafe mailing list