[Haskell-beginners] Functional programming principles at higher levels?
Christopher Howard
christopher.howard at frigidcode.com
Mon Sep 26 05:08:57 CEST 2011
On 09/25/2011 04:37 PM, austin seipp wrote:
> On Sun, Sep 25, 2011 at 12:45 AM, Christopher Howard
> <christopher.howard at frigidcode.com> wrote:
>> ...
>> snip
>> ...
>> Once I finally gave up on "learnyouahaskell" and other ridiculous tutorials, I found the real functional programming textbooks,
>> ...
>>
>
> Can I ask what books these are, and furthermore what makes them more
> 'real' than LYAH or RWH? I think both of them are quite good for just
> putting people on their feet and getting them writing code (although
> RWH can come off as a bit evangelical at times.) These kinds of works
> certainly are not for everybody, but I'm interested in your definition
> of 'real' vs 'ridiculous' more than anything, since I think it's very
> 'real' material for most programmers (I just find it funny because per
> my own experience, I'd think most people would write off type-theory
> textbooks as "ridiculous" and "not real", as opposed to material like
> LYAH/RWH. We'll ignore them, though.)
>
> I guess the real question isn't quite where the definitions of 'real'
> differ, but what you're trying to gain from reading these works. If
> you really *do* want to know about things like System F, or HM type
> inference, or the various kinds of polymorphism found in programming
> languages, then yes, LYAH and RWH are probably 'ridiculous' by those
> standards - and there are great books on these subjects too, in
> particular Benjamin Pierce's "Types and Programming Languages."
>
The real turning point for me was Davies book "Introduction to
Functional Programming" (1992). An oldie, but quite fascinating. I read
through about half of it, then went back and begun doing the practice
problems. Spent a few days in the Lambda Calculus chapter -- learned a
lot and then realized I needed to back up and get into Set Theory and
mathematical proofs. Found some other textbooks on Lambda Calculus
specifically, including Hankin's "Lambda Calculi" which is pretty good,
and (heaven help me) Barendregt's "The Lambda Calculus".
Personally, everything I've read about type theory so far has been
really fascinating, and I like to jump into it more as soon as I catch
up on some other mathematics.
> Going back to your initial question, I think the concepts are mostly
> orthogonal, aren't they? It's hard to know what you're asking. I'm not
> the biggest web-dev person in existence, but would it not be possible
> to write a RESTful service in something like Haskell, where your code
> you wrote is pure and cleanly isolated and all the other stuff we
> love? You could say programs like XMonad follow the 'MVC' pattern in
> its own way, as it cleanly separates its model - the internal Zipper
> data structure - from its view - X11 rendering - from its controller -
> configuration/input response. Is there some rigid pattern that must be
> followed closer than this? Or are you thinking about such overall
> designs that are more 'in tune' with FP and PL research itself? For
> many questions of this nature, I don't know how much type theory or PL
> semantics is going to come into the question - it exists in a
> different strata, it seems.
>
I don't know the answers to these questions, to be honest. I was hoping
for illuminating insight from you Haskell programming geniuses. But yes,
I am definitely curious if FP principles can be applied on higher levels
than just the compiled code. For example: sure we could rewrite some
RESTful service in Functional code, but is REST the best architectural
approach that we could be taking?
> P.S. Personally, I think it's wonderful we actually have a community
> (and people like you!) who're interested in taking the time to learn
> about these topics, for whatever reason. I actually think that much of
> the subject matter in the field is very rich, yet approachable -
> speaking from anecdotal evidence as someone who has no higher-math
> education.
>
Thanks.
--
frigidcode.com
theologia.indicium.us
More information about the Beginners
mailing list