Tuesday, January 11, 2011

Learning functional programming

Tonight I look at Tony Morris' presentation on How to learn function programming
He starts with a focus on Pure lazy programming...
I feel that laziness is nice locally but not globally. But I do get the point, in order to "think" functionally, laziness has the advantage to "free your mind". So maybe he is right.
(I think we all agree with pureness).

When I try to explain functional programming to programmers, I start by focusing on data differentiation. Sounds complicated but it is glue to which you can always revert back to. I do so by focusing on the notion of zipper, focus and traversal (map or iter). Also I would bring in monads pretty quickly because they allow the whole higher abstraction notion easily.

Then back to the presentation: functional programming takes years of training, as does OO. My recommendation: think big, write code at home and learn! I do "kind of" believe that developers that do not write at home, do not really gain enough skills to really be on top of their job.

Still listening to Tony, I do agree that unless you learn "deep" functional programming concepts, you do not understand procedural languages!

Finally, sounds silly but I do really, really believe that the only way to really understand functional programming (and therefore all other languages) is to write compilers for functional languages! Start small, take years if necessary, you will gain more than any other private development project!

No comments: