Today I came across Functional Programming for the Rest of Us, via Digg. Great article providing a nice overview of functional programming, including higher order functions, currying, lazy evaluation, continuations, pattern matching, and closures. And I’ve got to say that I’m finding functional programming pretty darn cool so far. I’m going to have to look into Erlang and Haskell. “Rock solid” systems? Definitely piques my interest. I wonder how Ruby fits into the FP paradigm. I know it does metaprogramming and closures, but I’m not sure on the other stuff. Anyway, I’m really looking forward to the next article, which the author says will probably cover “category theory, monads, functional data structures, type systems in functional languages, functional concurrency, functional databases and much more.” Good stuff. Drool.
And now that finals are over I’ll have more time to learn Lisp/Scheme via SICP. Speaking of Lisp, the same guy who wrote this functional programming article also wrote a great article on The Nature of Lisp. Here’s the quote that hooked me:
I was baffled. Many extremely intelligent people I knew and had much respect for were praising Lisp with almost religious dedication. There had to be something there, something I couldn’t afford not to get my hands on! Eventually my thirst for knowledge won me over. I took the plunge, bit the bullet, got my hands dirty, and began months of mind bending exercises. It was a journey on an endless lake of frustration. I turned my mind inside out, rinsed it, and put it back in place. I went through seven rings of hell and came back. And then I got it. The enlightenment came instantaneously. One moment I understood nothing, and the next moment everything clicked into place. I’ve achieved nirvana. Dozens of times I heard Eric Raymond’s statement quoted by different people: “Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot.” I never understood this statement. I never believed it could be true. And finally, after all the pain, it made sense! There was more truth to it than I ever could have imagined. I’ve achieved an almost divine state of mind, an instantaneous enlightenment experience that turned my view of computer science on its head in less than a single second.
So yes, I’m definitely going to keep hacking away until I “get it.” Can’t wait for that moment of enlightenment. :)
[tags]functional programming, FP, Erlang, Haskell, Ruby, Lisp, Scheme, Digg[/tags]
Comments
Do try and pick Erlang. It is a great language, albeit a very suprising one, at the begining. The “rock solid” part comes more from an alertness to problems than a supercharged internal stability – although the language and VM *are* indeed stable. It’s things like the low cost of creating processes [threads], hot-swapping of code and the supervisor model that make Erlang apps rock solid. What Google has been trying so hard all these years – “Forget about the hardware, it *is* going to fail, so let’s make sure the software doesn’t.”, the Erlang boys have pushed that to the next level – and seemingly effortlessly. “Forget about the software, something *is* going to break there too. Let’s just make sure we get notified in time, and spawn some replacement code.” And whether that code is on the same machine or 2,000 miles away, it is going to get replaced. Pretty amazing.
Throw in your two cents