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.