Hello Michael, Friday, August 10, 2007, 12:50:43 PM, you wrote:
> As for threading, in addition to Haskell's approach you might also > look at Erlang, which has a quite > different (and quite interesting) approach to the whole problem. I wonder if > anyone has tried to > implement a message-passing style of concurrency in Haskell. if you mean Erlang's sophisticated rules of which messages in queue to process first - this may be not yet implemented for Haskell. if you mean that program is just many threads which pass messages through channels to each other - it's easily accomplished in Haskell through Chan constructor. you can look at chameneos shootout entry, for example in my program (http://www.haskell.org/bz/FreeArc-sources.tar.gz) i run ~10 threads that process data sequentially - i.e. results of first thread are consumed by second one and so on. i glue them together with my own tiny threads library which somewhat mimics unix pipes: runP$ thread1 |> thread2 |> thread3 ... you can find this lib in Process.hs module. overall, i think that key to Haskell's simplicity of developing multithreaded programs is its immutable data, plus type inference which significantly improves gluing things together and using higher-order funcs -- Best regards, Bulat mailto:[EMAIL PROTECTED] _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe