In all other languages we've considered [Fortran, Algol60, Lisp, APL, Cobol, Pascal], a program consists of passive data-objects on the one hand and the executable program that manipulates these passive objects on the other. Object-oriented programs replace this bipartite structure with a homogeneous one: they consist of a set of data systems, each of which is capable of operating on itself.
- David Gelernter and Suresh J Jag
I couldn't have said it better myself. It's not what Paul Graham says at all. I can't help it if he never took the time to understand it.
3 comments:
I infer from this that you've not read the Structure and Interpretation of Computer Programs. That book's all about blurring the line between code and data using Lisp/Scheme.
Frankly, if you think that Lisp's imperative in the same way as the other languages in that list then you've not understood Lisp.
I still prefer to program in an OO language, but Scheme and Lisp both have features that it would be very cool to see in Ruby, but one of the biggies is uniform representation of code and data which means that Lispers can take a chunk of data and write a custom interpreter for it without having to write a parser at the same time.
I wouldn't have listed SCiP if I had not read it. I own quite a lot of Lisp books and have studied it extensively. You are right, the way Lisp handles things is different from other imperative languages. I was really ripping on Paul Graham (who I admire deeply, but his rips on OO, really stem from Java and C++, are not accurate. And that quote just inspired me to write about it). I think functional programming and object-oriented programming go hand in hand. They need each other.
I think one without the other is missing the point.
Reminds me of http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html?page=1
Post a Comment