Future of Programming is Functional Programming ?

I was reading this interesting article on ACM Queue called Extensible Programming for the 21st Century – the author talks about the current state of languages, compilers and libraries and then he proposes a solution to solve most of the problems – write programs in XML format!

Before I pour my thinking on that, one particular paragraph did catch my attention:

Programming languages often grow by formalizing and generalizing the best practices of
their day. Well-nested goto statements become structured programming’s conditionals
and loops; records that are accessed only through companion functions become objects;
functions that are identical except for data types become generics, and so on.


Ok, believe me, I took quite a while to digest what that guy’s saying about ‘extensible programming’ but its my understanding that it boils down to this – your program is always in a tree structure, you can imagine flowcharts to visualize this. So why not formalize it in the form of XML? Experienced guys will balk at this and say Lisp has been doing this for years! Yes, it has. So, why use XML? Because "S-expressions might have deserved to win, but XML has."

Its kind of really hard to imagine writing programs in XML, somehow I imagine I would never use such a language. I’m having a tough time just writing in DocBook XML! …. but still let me not jump to conclusions – the tutorial for the O:XML language looks interesting. You can program in O:XML like this:



I think I should really learn a functional language before making any judgements on this. I’ll probably take a look at Scheme or Haskell in future. Any ideas on which is the best FP (Functional Programming) language to start off with?

Just yesterday, Avinash was explaining to me about doing FP kind of programming in Python and how it is one of the reasons that Python is here to stay.

All this has got me interested in exploring the FP part of Python – rest assured, I’ll write about them in my book as well.

By the way, a good read is Paul Graham’s essay "Beating the Averages". He explains why Lisp was an advantage to him when building ViaWeb (which was later sold to Yahoo!).

Please do leave comments on your experiences with FP. I would be interested to hear about it.

12 thoughts on “Future of Programming is Functional Programming ?

  1. I’m partial to Scheme, especially PLT, though I have no experience with Haskell. Common Lisp would be my 2nd recommendation, though it’s hard to find a good free distribution for Windows. And honestly, Javascript can do some pretty cool FP-type things, E4X (works with Rhino) makes XML a native datatype in Javascript.

  2. Thanks Gordon! I will look into Scheme. I am not much of a Java and Javascript guy but I read some info about E4X recently and it sounded pretty cool.

  3. I’ve worked with OCaml and Scheme in the past. I haven’t used either of them for implementing anything big, nor do I know them well enough for me to be able to choose one.

    However, there’s one thing that you might want to consider before choosing one: OCaml consists of object-oriented concepts, Scheme — most implementations — doesn’t. And *maybe* if you don’t want to feel comfortable right away, you should go for Scheme. :)

  4. Best way to start out in FP is with Scheme and the textbook
    `Structure and Interpretation of Computer Programs’ – I have
    taught a bit of it in class (whatever little I understood) and
    find it to be really great for intellectual nourishment. Most of
    the Scheme stuff can be translated to straightforward Python

  5. Cool! Sriram, you have written a post on FP long ago :)

    Looks like I’m just late to the party :|

    Anyway, I’ll be reading your blog post soon, thanks!

  6. I concur with the endorsements of SICP — it’s an overwhelming book at times, but full of deep wisdom about functional programming as well as programming in general.

    I’ve spent quite a bit of time with Scheme and Objective Caml, and feel that it’s worth exploring both. For me, Scheme is a great language for experimentation, and Objective Caml is a great language for application development. I also wrote a small summary of my positive and negative experiences with Objective Caml on my weblog a while back that might be worth looking at.

Comments are closed.