Learning functional programming
  Home FAQ Contact Sign in
comp.lang.functional only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.functional Profile…
 Up
Learning functional programming         


Author: Michael Thaler
Date: Oct 29, 2007 12:55

Hello,

I would like to learn functional programming and I want to know the best
language for it. I know C, C++, Java, C# and Visual Basic and I tried to
learn some Haskell, but I have to admit I never really liked Haskell (I am
not really sure about the reason, maybe because it is a bit too academic).

I am thinking about Lisp, because there seem to be a lot of excellent Lisp
books. But I am not really sure if Lisp is a good way to learn functional
programming.

What language would you recommend for someone who knows object-oriented
programming and wants to learn functional programming? Why would you
recommend that language? What books can you recommend?

Thanks a lot in advance,
Michael
21 Comments
Re: Learning functional programming         


Author: namekuseijin
Date: Oct 29, 2007 17:29

On 29 out, 17:55, Michael Thaler muenchen.de> wrote:
> I would like to learn functional programming and I want to know the best
> language for it. I know C, C++, Java, C# and Visual Basic and I tried to
> learn some Haskell, but I have to admit I never really liked Haskell (I am
> not really sure about the reason, maybe because it is a bit too academic).

You could try OCaml, from the ML family. It's generally regarded the C
++ of the functional world: fast, practical, somewhat ugly. A lot
less bloated, of course.

It also boasts the OO paradigm (hence, the name) and direct imperative
constructs where you see fit (rather than Haskell's insistence on
purity via monads)...
> I am thinking about Lisp, because there seem to be a lot of excellent Lisp
> books.

if by Lisp you mean Common Lisp, forget it: it's just about as much
about imperative programming as C++, specially as much of its users
nowadays hail compilation and optimization above all.

You could try Scheme, which is a far more applicative and functional
Lisp. But if you've hated Haskell because it's "academic"...
no comments
Re: Learning functional programming         


Author: rubymaverick
Date: Oct 29, 2007 19:28

On Oct 29, 3:55 pm, Michael Thaler muenchen.de> wrote:
> Hello,
>
> I would like to learn functional programming and I want to know the best
> language for it. I know C, C++, Java, C# and Visual Basic and I tried to
> learn some Haskell, but I have to admit I never really liked Haskell (I am
> not really sure about the reason, maybe because it is a bit too academic).
>
> I am thinking about Lisp, because there seem to be a lot of excellent Lisp
> books. But I am not really sure if Lisp is a good way to learn functional
> programming.
>
> What language would you recommend for someone who knows object-oriented
> programming and wants to learn functional programming? Why would you
> recommend that language? What books can you recommend?
>
> Thanks a lot in advance,
...
Show full article (2.23Kb)
no comments
Re: Learning functional programming         


Author: Erik de Castro Lopo
Date: Oct 29, 2007 21:29

namekuseijin wrote:
> On 29 out, 17:55, Michael Thaler > muenchen.de> wrote:
>> I would like to learn functional programming and I want to know the best
>> language for it. I know C, C++, Java, C# and Visual Basic and I tried to
>> learn some Haskell, but I have to admit I never really liked Haskell (I
>> am not really sure about the reason, maybe because it is a bit too
>> academic).
>
> You could try OCaml, from the ML family. It's generally regarded the C
> ++ of the functional world: fast, practical, somewhat ugly. A lot
> less bloated, of course.

I would second the recommendation for trying Ocaml, especially
if you found haskell too academic.

Ocaml is, above all a practical and pragmatic language. Companies
like Jane St Capital (see the article in issue 7 of "The Monad
Reader") and XenSource among others are using Ocaml for real
world problems.
Show full article (1.98Kb)
no comments
Re: Learning functional programming         


Author: Torben Ægidius Mogensen
Date: Oct 30, 2007 01:35

Michael Thaler writes:
> What language would you recommend for someone who knows object-oriented
> programming and wants to learn functional programming? Why would you
> recommend that language? What books can you recommend?

Since you didn't like Haskell, I second the suggestions for a language
in the ML family. Since you mentioned using C#, F# (a variant of
OCaml for .NET) might be a good choice. There are to my knowledge no
books dedicated to F# (though John Harrop is working on "porting" his
OCaml book to F#), but you should be able to learn F# using OCaml
books, since the differences are minor.

Standard ML might be another choice. There are many different
implementations around, allowing you to choose between fast
compilation, fast code or a balance in-between. And there are a lot
more books teaching Standard ML than OCaml.

Or you could try Erlang. This functional language has become
increasingly popular for concurrent applications. Unlike the ML
languages above, it is dynamically typed (like Python etc.), and some
people find the syntax more arcane.

Torben
no comments
Re: Learning functional programming         


Date: Oct 30, 2007 10:20

Michael Thaler writes:
> I am thinking about Lisp, because there seem to be a lot of excellent Lisp
> books. But I am not really sure if Lisp is a good way to learn functional
> programming.

As others have said, certainly not Common Lisp. You might try Scheme.
You might also try Hedgehog Lisp (google for it), a tiny functional
Lisp dialect intended for small embedded systems.
> What language would you recommend for someone who knows object-oriented
> programming and wants to learn functional programming? Why would you
> recommend that language? What books can you recommend?

First of all, Hughes's famous paper "Why Functional Programming
Matters". Second, maybe SICP: http://mitpress.mit.edu/sicp if you're
interested in Scheme.
no comments
Re: Learning functional programming         


Author: Pascal Costanza
Date: Oct 30, 2007 11:57

namekuseijin wrote:
> On 29 out, 17:55, Michael Thaler > muenchen.de> wrote:
>> I would like to learn functional programming and I want to know the best
>> language for it. I know C, C++, Java, C# and Visual Basic and I tried to
>> learn some Haskell, but I have to admit I never really liked Haskell (I am
>> not really sure about the reason, maybe because it is a bit too academic).
>
> You could try OCaml, from the ML family. It's generally regarded the C
> ++ of the functional world: fast, practical, somewhat ugly. A lot
> less bloated, of course.
>
> It also boasts the OO paradigm (hence, the name) and direct imperative
> constructs where you see fit (rather than Haskell's insistence on
> purity via monads)...
>
>> I am thinking about Lisp, because there seem to be a lot of excellent Lisp
>> books.
>
> if by Lisp you mean Common Lisp, forget it: it's just about as much ...
Show full article (1.57Kb)
no comments
Re: Learning functional programming         


Author: Donn Cave
Date: Oct 30, 2007 12:00

In article <4726b31f_1@news.peopletelecom.com.au>,
Erik de Castro Lopo mega-nerd.com> wrote:
> namekuseijin wrote:
>
>> On 29 out, 17:55, Michael Thaler >> muenchen.de> wrote:
>>> I would like to learn functional programming and I want to know the best
>>> language...
Show full article (2.47Kb)
no comments
Re: Learning functional programming         


Author: Greg Buchholz
Date: Oct 30, 2007 17:29

Michael Thaler wrote:
> What language would you recommend for someone who knows object-oriented
> programming and wants to learn functional programming? Why would you
> recommend that language? What books can you recommend?

Besides the other recommendations, you might also want take a look
at the Q language [1]. The syntax is similar to Haskell, but it is
eagerly evaluated and dynamically typed. As for books, I liked "The
Haskell School of Expression" [2], and "ML for the Working
Programmer" [3] but then I also like Haskell.

1. http://q-lang.sourceforge.net/about.html
2. http://haskell.org/soe/
3. http://www.cl.cam.ac.uk/~lp15/MLbook/
no comments
Re: Learning functional programming         


Author: Jon Harrop
Date: Oct 30, 2007 17:27

Pascal Costanza wrote:
> namekuseijin wrote:
>> if by Lisp you mean Common Lisp, forget it: it's just about as much
>> about imperative programming as C++, specially as much of its users
>> nowadays hail compilation and optimization above all.
>
> That's nonsense. You can do functional programming in Common Lisp as
> well as in Scheme. There is no preference in Common Lisp for imperative
> programming (but it's also not discouraged),

There is little to no support for functional programming. Even function
application is absurdly tedious in Lisp.
> and there is no fixation on compilation and optimization in the Common
> Lisp community.

Lisp being very slow is hardly an advantage.

Lisp is an antique that you might enjoy tinkering with but all modern
functional programming languages employ a variety of constructs far beyond
the capabilities of Common Lisp. Don't bother with Lisp or any of its
dialects. Learn a modern language that gets functional programming right
first.
Show full article (1.08Kb)
no comments

RELATED THREADS
SubjectArticles qty Group
Hypergeometric functions and beta functionssci.math ·
2008/04/16 new programs and new trading programs addedalt.cracks ·
1 2 3