[Haskell-cafe] Channel9 Interview: Software Composability and the Future of Languages

Jacques Carette carette at mcmaster.ca
Sat Jan 27 10:15:21 EST 2007

Tim Newsham wrote:
>  I have to write:
>   > do {
>   >    x <- getSomeNum
>   >    y <- anotherWayToGetANum
>   >    return (x + y)
>   > }
> even if the computation of x and y are completely independant of
> each other.

I too have really missed a "parallel composition" operator to do 
something like the above.  Something like

do {
    { x <- getSomeNum || y <- anotherWayToGetANum}
    return (x+y)

Actually, that syntax is rather hideous.  What I would _really_ like to 
write is
do {
    (x,y) <- getSomeNum || anotherWayToGetANum
    return (x+y)

I would be happy to tell Haskell explicitly that my computations are 
independent (like the above), to expose parallelization opportunities.  
Right now, not only can I NOT do that, I am forced to do the exact 
opposite, and FORCE sequentiality.


More information about the Haskell-Cafe mailing list