Why Functional Programming?
hamletdarcy.blogspot.com
hamletdarcy.blogspot.com
Python offers it all, functional, procedural, object-oriented. So you just choose hwta fits the problem best and dont worry about politics.
Personally while learning Python I was also learning functional languages and I started to naturally drift towards a more functional style.
My functional code is just much more modular and natural than my OO-code.
Classes I to represent some data every now and then but it is not central to my designs.
I find the idea that Python offers it all surprising, for example my understanding is that anonymous functions can only be one line and you cannot write generic functions a'la CLOS.
If that is the case, while Python may offer a terrific language for Getting Stuff Done, you may want to consider learning other languages on the off chance that they actually do more in each of their respective areas. Then, when you return to Python you can apply what you've learned.
As you said this makes it very good for writing programs and does so in a lot of different domains but perhaps when digging really deep into one area you can find something better suited.
But why does no one gush over Erlang and Javascript when the FP hat gets passed around? Is OCaml really much better than either of these?
(Javascript, granted, has no shortage of warts. But it's the browser language we have, so it's worth learning to love it.)
I like JS enough to blog about it, but I confess I haven't found in it that marvelous thing that makes me see programming in a new light. So it may be that although Javascript is where you want to use your FP chops, Lisp or Ocaml is where you want to acquire them.
Nonetheless, there are all sorts of clever things you can do with closures in Javascript to avoid big declarations of global variables, etc... You just have to dig really hard to find the sample code that appears in the tutorials for lisp, haskell, ML, etc...
In terms of functional purity, Haskell > Lisp/Scheme/OCaml/ML > Erlang > Ruby/Javascript > Python > Java > etc.
Can somebody explain that?