In his Code Generation: The Safety Scissors Of Metaprogramming talk, Giles Bowkett talks about the power of Lisp and how Ruby approaches it. One of the Giles’ comparisons is that in Lisp (eq code data) which he translates into ruby as code == data. At the time, I just sort of went with the flow, but then I had a discussion with Mike Moore about SICP and I realized there’s a bit more to it than just that.
Mike pointed out a number of juicy quotes in the preface:
“Underlying our approach to this subject is our conviction that “computer science” is not a science and that its significance has little to do with computers.”
”... The computer revolution is a revolution in the way we think and in the way we express what we think.”
”... we want to establish the idea that a computer language is not just a way of getting a computer to perform operations but rather that it is a novel formal medium for expressing ideas about methodology. Thus, programs must be written for people to read, and only incidentally for machines to execute.”
”... we believe that the essential material to be addressed by a subject at this level is not the syntax of particular programming-language constructs, nor clever algorithms for computing particular functions efficiently, nor even the mathematical analysis of algorithms and the foundations of computing, but rather the techniques used to control the intellectual complexity of large software systems.”
so we should focus on “the techniques used to control the intellectual complexity of large software systems.”
The more I read these, the more I thought that these quotes read a lot like a Ruby Manifesto. I don’t want to take anything away from Lisp (and Scheme), it’s an incredibly powerful family of languages, and it lets Lisp hackers do amazing things. The thing is though, I don’t think this (think_about people things) is an accurate representation of how people.think.
One of the things that I’ve always loved about Ruby is that it combines a very powerful language with a very expressive language—it allows me to write code that maps very well to the way I think, and the way other programmers I know seem to think.
Is Ruby code beautiful, even poetic as some people claim? Sure, sometimes—but that’s not the point. Ruby makes it easy for me to express ideas in code, and to understand the ideas expressed in other people’s code. It helps me “control the intellectual complexity” of problems, it supports the revolution “in the way we express what we think.” So maybe that’s what it all boils down to.
Viva la Revolution! Viva la Ruby!