This post originated from an RSS feed registered with Python Buzz
by maxim khesin.
Original Post: C++ is a better LISP hmm...
Feed Title: python and the web
Feed URL: http://feeds.feedburner.com/PythonAndTheWeb
Feed Description: blog dedicated to python and the networks we live in
LISP has been getting a lot of traffic lately, which I almost entirely attribute to one man, Paul Graham. I think there is a bit of hype there - Paul is admittedly a cool guy, even if he is sometimes full of hot air, and does not believe anyone cool would ever program for, or on Windows. Still, even if he makes crazy claims, he is very funny about it. I still think the movement to put higher-order programming, lazy evaluation (see the classic 'Why functional programming matters') and metaprogramming to work is a great one. It's about time, and LISP appropriately gets the credit for a lot of this.
Some of these techniques have made if back into Algol-based languages, which are closer to C. In his 'Ruby is an acceptible LISP' post Eric Kidd makes a pretty convincing argument why Ruby, whith just enough functional capabilities, some syntactic sugar to make them convenient, easy metaprogramming and a lively community can be a better choice than LISP.
I have heard similar claims about Ruby's prowess (in this case about closures) before, from Martin Fowler (whos bliki seems temporarily out of service. cache link if it's still down).
Having to work mostly in C++ these days I try to use as much higher-order programming as I can (actually STL paved the way for this). This has certainly made coding more fun and productive. Fortunately I do not have to reinvent any wheels here - the guys at Boost.org have pretty much figured all the tricks. With templates C++ has become very capable of metaprogramming of all sorts, and even coming up with an reasonable syntax for such things as closures. Just to entertain myself I used the Boost.Lambda library to implement Martin's closure rant in C++. It's not pretty completly pretty, but with habit I think the lambda syntax, even the trickier cases, like conditionals, is usable (the easier cases, like currying, are very usable).
The results are here. (Warning: some material may be unsuitable for non-C++ programmers).
Ok, so C++ is fast, has a huge community and now does Higher-Order programming. Program your next website in C++, anyone?