[Haskell-cafe] Elevator pitch for functional programming

Dan Weston westondan at imageworks.com
Tue Jan 20 15:25:00 EST 2009


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?

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