From: Samir Sekkat
Subject: What books for functional programming do you recommend ?
Date: 
Message-ID: <MPG.1414f3f066e8895e989686@news.compuserve.com>
Hi everyone,

I want to learn more about functional programming. I am using Common 
Lisp.

I found this list of books in the FAQ of comp.lang.functional.
Which one do you recommend? (I do not have access to an english library 
to see them!) 

I am looking both for an introduction and in-depth book about the 
concepts of functional programming.

1- "Introduction to functional programming using Haskell", 2nd edition, 
Richard Bird, Prentice Hall Europe, 1998. ISBN 0-13-484346-0. 

2- "The Haskell school of expression: Learning functional programming 
through multimedia", Paul Hudak, Cambridge University Press, 2000. ISBN 
0-521-64338-4. 

3- "Haskell: The craft of functional programming", 2nd edition, Simon 
Thompson, Addison-Wesley, 1999. ISBN 0-201-34275-8. 

4- "ML for the working programmer", 2nd Edition, L.C. Paulson, Cambridge 
University Press, 1996. ISBN 0-521-56543-X. 

5- "Purely functional data structures", Chris Okasaki, Cambridge 
University Press, 1998. ISBN 0-521-63124-6. 

6- "Algorithms: A functional programming approach", Fethi Rabhi and Guy 
Lapalme, Addison-Wesley, 1999. ISBN 0-201-59604-0. 

Thanks a lot for your help,
Samir Sekkat, Munich, Germany 

From: Brad Knotwell
Subject: Re: What books for functional programming do you recommend ?
Date: 
Message-ID: <qllmxi3e4n.fsf@ix.netcom.com>
Samir Sekkat <············@bigfoot.DELETETHIS.com> writes:
> Hi everyone,
> 
> I want to learn more about functional programming. I am using Common 
> Lisp.
> 
> I found this list of books in the FAQ of comp.lang.functional.
> Which one do you recommend? (I do not have access to an english library 
> to see them!) 
> 
> I am looking both for an introduction and in-depth book about the 
> concepts of functional programming.
> 
> Thanks a lot for your help,
> Samir Sekkat, Munich, Germany 

Another book (not on your list) you might want to look at is Paul Graham's
_On Lisp_.  It has particularly good coverage of Common Lisp's macro
system.

--Brad
From: Markus Mottl
Subject: Re: What books for functional programming do you recommend ?
Date: 
Message-ID: <8oemkk$efk$1@bird.wu-wien.ac.at>
In comp.lang.functional Samir Sekkat <············@bigfoot.deletethis.com> wrote:
> I want to learn more about functional programming. I am using Common 
> Lisp.

> 4- "ML for the working programmer", 2nd Edition, L.C. Paulson, Cambridge 
> University Press, 1996. ISBN 0-521-56543-X. 

> 5- "Purely functional data structures", Chris Okasaki, Cambridge 
> University Press, 1998. ISBN 0-521-63124-6. 

I have read these two books and can recommend both, especially Okasaki.

Best regards,
Markus Mottl

-- 
Markus Mottl, ·····@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl
From: Christopher Browne
Subject: Re: What books for functional programming do you recommend ?
Date: 
Message-ID: <slrn8qm3cq.mff.cbbrowne@knuth.brownes.org>
Centuries ago, Nostradamus foresaw a time when Markus Mottl would say:
>In comp.lang.functional Samir Sekkat <············@bigfoot.deletethis.com> wrote:
>> I want to learn more about functional programming. I am using Common 
>> Lisp.
>
>> 4- "ML for the working programmer", 2nd Edition, L.C. Paulson, Cambridge 
>> University Press, 1996. ISBN 0-521-56543-X. 
>
>> 5- "Purely functional data structures", Chris Okasaki, Cambridge 
>> University Press, 1998. ISBN 0-521-63124-6. 
>
>I have read these two books and can recommend both, especially Okasaki.

I'd think another good option would be to look at the documentation
for the SERIES package for Common Lisp, findable at
<http://series.sourceforge.net/> which provides a way of describing
and composing 'sequences' in a fairly much functional manner in
a specifically CL-oriented context.

-- 
········@acm.org - <http://www.hex.net/~cbbrowne/linux.html>
Idiosyncratic indentations, double-spacing, capitalization, etc., while
stamps of individuality, leave one an easy target for parody.
-- from the Symbolics Guidelines for Sending Mail
From: Michel Schinz
Subject: Re: What books for functional programming do you recommend ?
Date: 
Message-ID: <yors7l90a5xf.fsf@lamppc6.epfl.ch>
Samir Sekkat <············@bigfoot.DELETETHIS.com> writes:

> Hi everyone,

[...]

> I am looking both for an introduction and in-depth book about the
> concepts of functional programming.

I found the following to be truely excellent: "The Functional Approach
to Programming" by Guy Cousineau and Michel Mauny, Cambridge
University Press, ISBN 0521576814. I only read the french edition,
but was told that the english one is as good.

The authors use the Caml language to introduce functional programming.
The examples are wonderful, realistic and usually non-trivial. They
cover areas such as arbitrary-precision arithmetic, parsing, tree
drawing, tiling, etc. It somewhat reminds me of "Structure and
Interpretation of Computer Programs" (also excellent) but with Scheme
replaced by Caml.

HTH,
Michel.
From: Samir Sekkat
Subject: Re: What books for functional programming do you recommend ?
Date: 
Message-ID: <MPG.141636a9d10b1248989687@news.compuserve.com>
In article <················@lamppc6.epfl.ch>, ·············@epfl.ch 
says...

Thanks to all of you, 
Michel, Brad, Markus, Christopher, Friedrich, Torben,
for your valuable comments.

Yes, I know that Lisp is much more than functional programming ("On Lisp" 
and "The Art of the Metaobject Protocol" are my daily guides).

I am just intriged by the question
How can OO-Programming and Functional Programming be mixed? Or is that 
the wrong question???

So I will try to go in-depth in funtional programming to find a answer...

Samir, Munich, Germany
> Samir Sekkat <············@bigfoot.DELETETHIS.com> writes:
> 
> > Hi everyone,
> 
> [...]
> 
> > I am looking both for an introduction and in-depth book about the
> > concepts of functional programming.
> 
> I found the following to be truely excellent: "The Functional Approach
> to Programming" by Guy Cousineau and Michel Mauny, Cambridge
> University Press, ISBN 0521576814. I only read the french edition,
> but was told that the english one is as good.
> 
> The authors use the Caml language to introduce functional programming.
> The examples are wonderful, realistic and usually non-trivial. They
> cover areas such as arbitrary-precision arithmetic, parsing, tree
> drawing, tiling, etc. It somewhat reminds me of "Structure and
> Interpretation of Computer Programs" (also excellent) but with Scheme
> replaced by Caml.
> 
> HTH,
> Michel.
> 
From: Markus Mottl
Subject: Re: What books for functional programming do you recommend ?
Date: 
Message-ID: <8ohdv2$70j$1@bird.wu-wien.ac.at>
In comp.lang.functional Samir Sekkat <············@bigfoot.deletethis.com>
wrote:
> I am just intriged by the question How can OO-Programming and Functional
> Programming be mixed? Or is that the wrong question???

If you want to have an answer, you might want to take a look at the
OO-extension of the ML-dialect OCaml:

  http://caml.inria.fr

Best regards,
Markus Mottl

-- 
Markus Mottl, ·····@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl
From: Christopher Browne
Subject: Re: What books for functional programming do you recommend ?
Date: 
Message-ID: <wb_q5.545921$MB.8245520@news6.giganews.com>
Centuries ago, Nostradamus foresaw a time when Samir Sekkat would say:
>In article <················@lamppc6.epfl.ch>, ·············@epfl.ch 
>says...
>
>Thanks to all of you, 
>Michel, Brad, Markus, Christopher, Friedrich, Torben,
>for your valuable comments.
>
>Yes, I know that Lisp is much more than functional programming ("On
>Lisp" and "The Art of the Metaobject Protocol" are my daily guides).

Lisp is arguably largely _NOT_ functional programming...

>I am just intriged by the question How can OO-Programming and
>Functional Programming be mixed? Or is that the wrong question???

That's a good question; it sure seems to me that the answer is that
they are _not_ miscible; OO inherently has a whopping _LOT_ of
side-effects, which is not compatible with the functional notion of
side-effect-less programming.

What Common Lisp shows off, as well as OCAML, is that you can combine
multiple programming paradigms within one language; imperative where
imperative is useful, and functional where functional is useful.

The "problem" may lie in telling those situations apart, and in
designing "syntax"/"macros"/"libraries"/"methods" to properly cope
with those places where you need to cross over from one approach to
the other.  (I'd say "paradigm," but that word seems so overused by
people who wouldn't know what a paradigm was if it bit their leg...)
-- 
(concatenate 'string "aa454" ·@" "freenet.carleton.ca")
<http://www.hex.net/~cbbrowne/lsf.html>
Why do we drive on parkways and park on driveways?
From: Friedrich Dominicus
Subject: Re: What books for functional programming do you recommend ?
Date: 
Message-ID: <87pumr6z45.fsf@q-software-solutions.com>
> 
> That's a good question; it sure seems to me that the answer is that
> they are _not_ miscible; OO inherently has a whopping _LOT_ of
> side-effects, which is not compatible with the functional notion of
> side-effect-less programming.

I disagree. A clean separation of one or the other seems to be
doable. I do not know where to discuss this because it seems to be
off-topic, here. Just so much I have used Eiffel for a long time
now. There is a thing called command query separation. The tasks of
the commands are to have side-effects and queries are not supposed to
have side-effects. This is unfortunatly not enforced by the compiler
so it is possible to write queries (aka functions) with
side-effects. Just FYI in Eiffel you have to write

io.read_string;
str := io.last_string;

you can seee the CQS in action here. read_string is a command it's
side-effect is to set `last_string`. Now with io.last_string one can
check what the value now is. As long as there isn't anotehr
read_string last_string won't get changed. So in this case last_string
is a side-effect free query (function)
> 
> The "problem" may lie in telling those situations apart, and in
> designing "syntax"/"macros"/"libraries"/"methods" to properly cope
> with those places where you need to cross over from one approach to
> the other.  (I'd say "paradigm," but that word seems so overused by
> people who wouldn't know what a paradigm was if it bit their leg...)

We spend some time on this topic. And we do think that combining OOP
and FP is a very good thing. We draw the border very strictly. A
functions is not allowed to have side-effects, if you wan't to change
the state of an object you have to use commands. This is enforced by
the compiler we're developing. We are not functional programming
experts and so our language tackles the problem from the OO-side
(heavily influenced by Eiffel). AFAIK is the problem tackled in OCAML
and Common Lisp from the functional side. 

But I do think I'm getting off-topic here, so I'll better stop here.

Regards
Friedrich

-- 
for e-mail reply remove all after .com 
From: Marshall Abrams
Subject: functional OO programming
Date: 
Message-ID: <MJur5.66$v3.1354@uchinews>
In article <·······················@news6.giganews.com>,
Christopher Browne <········@hex.net> wrote:
>That's a good question; it sure seems to me that the answer is that
>they are _not_ miscible; OO inherently has a whopping _LOT_ of
>side-effects, which is not compatible with the functional notion of
>side-effect-less programming.

Yes, much OO programming does center around side-effects.  But
many of the concepts that have been bundled up in the OO
paradigm could be used in a functional context.  For example,
there's nothing intrinsically anti-functional about inheritance,
nor about hiding the details of data behind accessor
methods--well, get methods in particular.  The idea is that you
have to initialize the value of every instance variable in an
object with a value passed to the constructor, or perhaps by
some other initialization code, and then you have methods that
return the data inside the object, but never change it.  And you
get to use inheritance in whatever way is useful.

Felleisen and Friedman's _A Little Java, A Few Patterns_ is one
illustration of this sort of thing.  Chailloux et al.'s
_Developpement d'applications avec Objective Caml_ includes a
short discussion of using OCaml's object system in a functional
style, and OCaml has some special syntax to make this more
convenient (allowing you to easily make a copy of an object with
only some of its fields changed).  O'Haskell is another
illustration, adding a more mainstream OO inheritance system to
Haskell, though standard Haskell's type system makes use of some
of the concepts common in OO inheritance, albeit in a different
manner.  Of course the encapsulation of data often comes up in
functional programming languages via module systems.
-- 
Marshall Abrams				 ····@midway.uchicago.edu
From: Mark Carroll
Subject: Re: What books for functional programming do you recommend ?
Date: 
Message-ID: <8olthh$sqs$1@news.cis.ohio-state.edu>
In article <·······················@news6.giganews.com>,
Christopher Browne <········@hex.net> wrote:
(snip)
>That's a good question; it sure seems to me that the answer is that
>they are _not_ miscible; OO inherently has a whopping _LOT_ of
>side-effects, which is not compatible with the functional notion of
>side-effect-less programming.
(snip)

Well, I suppose you could make objects be a bit like closures, where
an object instance is a function that takes 'which method' as one of
its arguments and returns a two-tuple of (a) a function it just
created representing an object instance that behaves like the object
in its new state and (b) the return value of the method.

(Did that make any sense to anybody?)

That way, you can kind of use objects and call their methods without
needing to have anything actually mutable.

-- Mark
From: Torben Hoffmann
Subject: Re: What books for functional programming do you recommend ?
Date: 
Message-ID: <39AB65A3.3F4A6A4D@it.dtu.dk>
Hi Samir.

Samir Sekkat wrote:
> 
> Hi everyone,
> 
> I want to learn more about functional programming. I am using Common
> Lisp.
> 
> I found this list of books in the FAQ of comp.lang.functional.
> Which one do you recommend? (I do not have access to an english library
> to see them!)
> 
> I am looking both for an introduction and in-depth book about the
> concepts of functional programming.
> 
> 4- "ML for the working programmer", 2nd Edition, L.C. Paulson, Cambridge
> University Press, 1996. ISBN 0-521-56543-X.
> 

This is the only book on the list that I've read and it is a good book.
The drawback is that it has a lot on theorem provers (Paulsons favorite
topic)  and allthough it is very well presented it might not be the
first thing you'd like to know about.

Another book which I recommend is "Introduction to Programming using
SML" by Michael R. Hansen and Hans Rischel.

There is a homepage for the book: http://www.it.dtu.dk/introSML/

The emphasis of the book is not only the language SML but also on
modelling of problems and especially how to use the powers of SML to
provide suitable abstractions.

The book is used for a first semester course in functional programming
at the Technical University of Denmark with good results.

Best regards
Torben

--  Torben Hoffmann                |  Dept. of Information Technology 
--  E-mail: ····@it.dtu.dk         |  Technical University of Denmark 
--     ···············@tellabs.com |  Building 344                    
--  Phone DTU    : +45 45 25 37 62 |  DK 2800 Lyngby,
Denmark                  
--  Phone Tellabs: +45 44 73 30 72 |  OR:             
--  Fax   DTU    : +45 45 93 00 74 |  Tellabs Denmark A/S,            
--  Fax   Tellabs: +45 44 73 24 70 |  Lautrupbjerg 7-11               
--  Private      : +45 45 86 63 17 |  DK 2750 Ballerup, Denmark
From: Friedrich Dominicus
Subject: Re: What books for functional programming do you recommend ?
Date: 
Message-ID: <87k8d0k3ak.fsf@q-software-solutions.com>
Samir Sekkat <············@bigfoot.DELETETHIS.com> writes:

Just my two cents, because I was and am in a simular position as you
are.
> Hi everyone,
> 
> I want to learn more about functional programming. I am using Common 
> Lisp.

Common Lisp offeres more than "just" functional programming. It
provided features for all kind of programming paradigms. E.g CLOS is
about Object oriented programming. Of course one can learn FP with
Common Lisp too, just it would not cover all the features Common Lisp
provides. Anyway at the moment my personal language favorite is Common
Lisp. I never have seen such a flexible language before. IMHO good
books about Common Lisp are:
Object Oriented Common Lisp (besides it misleading title it has
examples about the different properties of Common Lisp)
then there is a book from Peter Norvig (don't have the book at hand)
but the title is about AI programming with Common Lisp.
A lot of people suggest that Paul Grahams "ANSI Common Lisp" is worth
reading.
You too got a good online documentation called Hyperspec. And there is
the book from Guy L. Steele Common Lisp
you can check out this site www.alu.org



> 
> I found this list of books in the FAQ of comp.lang.functional.
> Which one do you recommend? (I do not have access to an english library 
> to see them!) 
> 
> I am looking both for an introduction and in-depth book about the 
> concepts of functional programming.
> 
> 1- "Introduction to functional programming using Haskell", 2nd edition, 
> Richard Bird, Prentice Hall Europe, 1998. ISBN 0-13-484346-0. 
> 
> 2- "The Haskell school of expression: Learning functional programming 
> through multimedia", Paul Hudak, Cambridge University Press, 2000. ISBN 
> 0-521-64338-4. 
> 
> 3- "Haskell: The craft of functional programming", 2nd edition, Simon 
> Thompson, Addison-Wesley, 1999. ISBN 0-201-34275-8. 

All this books are dealing with Haskell which is very different from
Common Lisp. I would suggest not using them for learning Common Lisp,
but for learning Haskell.

I do not know the first one. But the two others have found their way
to my bookshelf and I'm using "The Hasell school of expression" to
teach myself Haskell. If found this book better than the third but
both are worth reading.


Regards
Friedrich
-- 
for e-mail reply remove all after .com