[Haskell-cafe] Elevator pitch for functional programming
Jim Burton
jim at sdf-eu.org
Tue Jan 20 15:55:28 EST 2009
At Tue, 20 Jan 2009 12:25:00 -0800,
Dan Weston wrote:
>
Hi Dan,
> One of the coolest things about Haskell is the ability to refer to
> values not yet calculated, without having to work out the timing yourself.
>
> You want Fibonacci numbers?
>
Well, I might but they definitely do not :-) We are talking about some
maths-averse people and you would not have got to the final syllable
of 'fibonacci' before all hope was lost. But I am sure there are
plenty of examples that rely on laziness which will communicate. I am
sure I read a blog post or something on c.l.f/c.l.h recently about
lazily sorting a million numbers but can't find it.
Jim
> Prelude> let z = zipWith (+) (0:1:z) (0:z) in take 10 z
> [0,1,1,2,3,5,8,13,21,34]
>
> Try doing that in one line of C++.
>
> See also e.g.
>
> http://sigfpe.blogspot.com/2006/12/tying-knots-generically.html
>
> Dan
>
> Jim Burton wrote:
> >
> > Jim Burton wrote:
> >>
> >> Adrian Neumann wrote:
> >>> There was a thread about that:
> >>>
> >>> > http://www.haskell.org/pipermail/haskell-cafe/2007-September/
> >>> 031402.html
> >> Thanks! I didn't literally mean "elevator pitch" and if I knew that thread
> >> existed would have phrased my post differently, because a list of the
> >> things that are cool about Haskell will not impress them. What I want and
> >> am finding it hard to create are examples where FP shines and, for the
> >> same problem, imperative languages look like more work.
> >>
> >
> > Parallelism! Something based on dons' blog
> > http://cgi.cse.unsw.edu.au/~dons/blog/2007/11/29#smoking-4core will be a
> > good start.
> >
> >
> > Many will think of
> >> programming solely in terms of developing websites, GUIs, database access,
> >> so I will demonstrate how strongly-typed database access can help them.
> >>
> >> Jim
> >>
> >> [...]
> >>
> >>
> >
>
More information about the Haskell-Cafe
mailing list