Pragmatic concurrency Re: [Haskell-cafe] multiple computations, same input

Brian Hulley brianh at metamilk.com
Wed Mar 29 12:11:35 EST 2006


Robin Green wrote:
> On Wed, 29 Mar 2006 12:50:02 +0100
> Jon Fairbairn <jon.fairbairn at cl.cam.ac.uk> wrote:
>> [snip]
>> 1) choosing the optimal reduction strategy is undecidable
>>
>> 2) we shouldn't (in general) attempt to do undecidable
>>    things automatically
>> [snip]
>[snip]
> I suggest that a Haskell program should be treated as an executable
> specification. In some cases the compiler can't optimise the program
> well enough, so we (by which I mean, ordinary programmers, not
> compiler geeks) should be able to explicitly provide our own
> optimisations, as rewrite rules (generalised ones, or specialised
> ones for individual functions). Democratise the means of automated
> optimisation!

This sounds good. The only thing I'm wondering is what do we actually gain 
by using Haskell in the first place instead of just a strict language? It 
seems that Haskell's lazyness gives a succinct but too inefficient program 
which then needs extra code in the form of rewrite rules/pragmas, or else a 
complete rewrite in terms of seq etc to get it to run fast enough without 
space leaks...

Regards, Brian. 



More information about the Haskell-Cafe mailing list