Posted By: TimP | Oct 24th, 2007 @ 3:44 PM
page 1 of 1
Comments: 4 | Views: 2230

I've been watching a lot of the JAOO videos (the most C9 I've watched in a long time) and it's sparked some curiosity in functional programming languages. I was wondering if anyone had any good references with examples for learning functional programming basics. Ideally something easy to read that doesn't look like it came from a college math book would be nice. I'm also interested in the language agnostic background like further explanations of lambda, closures, etc. in terms that don't involve a plethora of Greek letters and subscripts.

I'm interested in a traditional functional programming language. Any recommendations? Haskell seems to be on the receiving end of all jokes, but some popular ones I've seen thrown around are Common Lisp, Scheme, and OCaml.

TimP wrote:


I've been watching a lot of the JAOO videos (the most C9 I've watched in a long time) and it's sparked some curiosity in functional programming languages. I was wondering if anyone had any good references with examples for learning functional programming basics. Ideally something easy to read that doesn't look like it came from a college math book would be nice. I'm also interested in the language agnostic background like further explanations of lambda, closures, etc. in terms that don't involve a plethora of Greek letters and subscripts.

I'm interested in a traditional functional programming language. Any recommendations? Haskell seems to be on the receiving end of all jokes, but some popular ones I've seen thrown around are Common Lisp, Scheme, and OCaml.



To get into the idea with out going into heavy academic stuff, try out Ruby.  The intro to the language, available on the Ruby web site, goes into several functional concepts with the language.
JohnnyAwesome
JohnnyAwesome
Eggshell with Romalian type. What do you think?
I am by no means an expert in this area, but I have never heard Ruby really described as a functional programming language and from what little Ruby I have done it certainly did not seem functional to me. It may have some qualities like closures and lambdas but it is an imperative language.

One of the online authors I really enjoy who is very much into functional programming is Larry O'Brien who has written several places about Erlang and there is a new Erlang book at present as well. I also think that is the language that the YAWS project is written in.

If you are really looking to get into it, why not give F# a try? It's now officially a member of the .NET family now.

JohnnyAwesome wrote:
I am by no means an expert in this area, but I have never heard Ruby really described as a functional programming language and from what little Ruby I have done it certainly did not seem functional to me. It may have some qualities like closures and lambdas but it is an imperative language.

One of the online authors I really enjoy who is very much into functional programming is Larry O'Brien who has written several places about Erlang and there is a new Erlang book at present as well. I also think that is the language that the YAWS project is written in.

If you are really looking to get into it, why not give F# a try? It's now officially a member of the .NET family now.



http://en.wikipedia.org/wiki/Functional_programming

"A number of concepts and paradigms are specific to functional programming, and generally foreign to imperative programming ."

Ruby has most of the concepts of a functional programming language.  Purists will point out it does not have "pure functions", meaning Ruby functions can have side effects.  But that's about the only thing lacking.

Ruby isn't functional, OO or imperative.  It's a hybrid of all of those.  It's not a purely functional language, but you can use it like it was.  Many of the built in language constructs ARE functional in nature, such as map, reduce, etc.

I suggested Ruby not because it was a "functional language"... in fact I hinted that it wasn't when I stated it would provide a non-acedemic intro to functional programming.  The OP wanted to learn about functional programming, not about purely functional languages.  It's my opinion that a hybrid language is the most useful way to make the transition from imperative to functional, thus my suggestion.

Which, by the way, brings up a good point.  You can do functional programming in C#.  LINQ depends on this.  This is not to say, however, that C# is a functional language.  It's not.  It's a hybrid.
Charles
Charles
Welcome Change

F# is a good candidate! Smiley

Erlang and Haskell are good academic choices (especially Haskell). I'm reading Joe Armstrong's latest book on Erlang and, in fact, it's a great general introduction to functional and concurrent programming. It's a great read. Superbly written.

C

PS: You will see Joe on C9 very soon Smiley

page 1 of 1
Comments: 4 | Views: 2230
Microsoft Communities