Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Functional Programming Group Meeting



On 2008-04-23 14:51 +0900 (Wed), Stephen J. Turnbull wrote:

> Curt Sampson writes:
> 
>  > In the case of Darcs 1.x, yes. This is fixed in 2.0.
> 
> No, it hasn't.  Nobody has made that claim that I know of.  Some
> important improvements have been made, but nobody claims that the
> exponential conflict issue is fixed, and there been regressions, too.

I guess you're thinking of a different issue than the one I know about.
Send me the details, if you like, and I'll look into this.

> I'm not claiming that average case is bad.  I'm claiming that worst
> case can be surprisingly bad.

So, would you also claim that in non-lazy languages the worst case can
also be surprisingly bad? When I set up the full search tree for a
problem and start searching it, it suprises me now that the computer
went and did about a hundred CPU-years of computations that it then
threw away becuase they were never used.

I think it's merely a matter of perspective. To take an example that
you'll find easy to shoot down in the details, but that I think gets
the point across, many programmers probably happen to habitually assume
that lists of infinite length consume a lot of resources, or require one
to set up some sort of special generator thing; I use them regularly
because why would you go to all the extra effort to set up a list good
for only 2^63 items when it both can fail and will use more CPU and
memory?

Haskell certainly needs a different way of thinking. However, saying
that "commonly used" algorithms have "suprising" behaviour is about the
same as complaining that one's good algorithms don't work in Smalltalk
because it doesn't have a computed GOTO.

By the way, if you're just saying that the average C++ or Java progammer
is sometimes going to be suprised, not to mention mystified, at how bad
his favourite algorithm is when used in Haskell, I'm with you there.
Obviously I'm not learning Haskell in order to confirm that Java is the
best language in the world....

cjs
-- 
Curt Sampson       <cjs@example.com>        +81 90 7737 2974   
Mobile sites and software consulting: http://www.starling-software.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links