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.