[Haskell-cafe] Why functional programming matters
Ryan Dickie
goalieca at gmail.com
Wed Jan 23 18:22:47 EST 2008
On Jan 23, 2008 5:29 AM, Simon Peyton-Jones <simonpj at microsoft.com> wrote:
> Friends
>
> Over the next few months I'm giving two or three talks to groups of *non*
> functional programmers about why functional programming is interesting and
> important. If you like, it's the same general goal as John Hughes's famous
> paper "Why functional programming matters".
>
> Audience: some are technical managers, some are professional programmers;
> but my base assumption is that none already know anything much about
> functional programming.
>
> Now, I can easily rant on about the glories of functional programming, but
> I'm a biased witness -- I've been doing this stuff too long. So this
> message is ask your help, especially if you are someone who has a
> somewhat-recent recollection of realising "wow, this fp stuff is so
> cool/useful/powerful/etc".
>
> I'm going to say some general things, of course, about purity and effects,
> modularity, types, testing, reasoning, parallelism and so on. But I hate
> general waffle, so I want to give concrete evidence, and that is what I
> particularly want your help with. I'm thinking of two sorts of "evidence":
>
>
> 1. Small examples of actual code. The goal here is (a) to convey a
> visceral idea of what functional programming *is*, rather than just assume
> the audience knows (they don't), and (b) to convey an idea of why it might
> be good. One of my favourite examples is quicksort, for reasons explained
> here:
> http://haskell.org/haskellwiki/Introduction#What.27s_good_about_functional_programming.3F
>
> But I'm sure that you each have a personal favourite or two. Would you
> like to send them to me, along with a paragraph or two about why you found
> it compelling? For this purpose, a dozen lines of code or so is probably a
> maximum.
>
>
> 2. War stories from real life. eg "In company X in 2004 they rewrote
> their application in Haskell/Caml with result Y". Again, for my purpose I
> can't tell very long stories; but your message can give a bit more detail
> than one might actually give in a presentation. The more concrete and
> specific, the better. E.g. what, exactly, about using a functional
> language made it a win for you?
>
>
> If you just reply to me, with evidence of either kind, I'll glue it
> together (regardless of whether I find I can use it in my talks), and put
> the result on a Wiki page somewhere. In both cases pointers to blog entries
> are fine.
>
> Quite a lot of this is FP-ish rather than Haskell-ish, but I'm consulting
> the Haskell mailing lists first because I think you'll give me plenty to go
> on; and because at least one of the talks *is* Haskell-specific. However,
> feel free to reply in F# or Caml if that's easier for you.
>
> Thanks!
>
> Simon
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
I'm still just learning haskell but maybe as a n00b I can give you some
insight into what I think is important.
I will take a guess here and say most of your audience is from the
object-oriented crowd. Their software engineering practices are probably
entirely based upon the idea of wrapping state up in objects and passing
them around. They're probably going to want ways to leverage these
techniques without dropping everything.
I personally think it is neat that non-functional languages are starting to
borrow many ideas from functional languages. C# has lambda and LINQ, java
might be adding closures. Scala is functional but has access to all the
goodies of the java library. Python has list comprehensions. Even c++ is
going to be adding lambda expressions (which are really handy for the stl
algos which are functional like themselves).
Error handling and QA are very important in the real world. It might not
hurt to show a few simple quick check examples and cases where errors are
caught at compile time. There are probably many examples in ghc development.
--
Ryan Dickie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080123/c35fedf9/attachment.htm
More information about the Haskell-Cafe
mailing list