Talking to People, not Computers
Posted on May 9, 2008
Filed Under Quote |
It’s possible to program a computer in English. It’s also possible to make an airplane controlled by reins and spurs. - John McCarthy, 196x.
This is pretty thought-provoking for being a flippant remark on computer language design. I don’t 100% agree with the sentiment of this quote (which is hard to do in the face of the developer of Lisp), but it certainly raises some good issues.
The less written in a language to complete a task, the better the language. English could be used to program computers, but the result would be quite unwieldy. Why? To even talk about mathematics and algorithms out loud, mathematicians and computer scientists need to create precise, exact definitions of every single building block that they use. English doesn’t cut it, even amongst native speakers. There would need to be a big huge conference of the hive minds of language design to sit and decide what each of the notions would be and how they would be expressed in English, and even then the language would still suck for a lot of programming tasks.
The consequences of vague language are disasterous: proofs are wrong, programs are wrong, and people punch each other in the face. McCarthy has very real concerns: if you told your robot that it should kill time, your wall clock might be in very real danger. There are much better means of specifying algorithms and mathematics, and these should be used when describing algorithms and mathematics.
However…
As has been pointed out before [shameless self-reference], one of the main reasons that we have programming languages is to show other people how we talk to the computer. We don’t program in Lisp or Python or C++ or Fortran because computers explicitly speak these languages. They need to be compiled down to machine language. If we wanted to speak directly to computers, we should be using the machine language. The reason we don’t is so that we can share our code easily with others, and easily organize our own thoughts. Our languages are designed directly for humans to convey mathematical and algorithmic thought.
Likewise, we don’t steer airplanes by manually moving the flaps and pouring the fuel into the engines. We have a human interface that flies the airplane for us, that humans can talk to, and humans can listen to. The actual act of flying has nothing to do with moving a joystick or flipping a switch, but it is a handy metaphor.
English is obviously not the right language to manipulate math. However, SQL is little more than structured English, and it acts excellently as a data storage/retrieval language. Even those with no programming experience can get the idea of what a SQL query is attempting to accomplish BECAUSE it is simply structured English.
It all comes down to “the right tool for the right job.”
Popularity: 6% [?]
Comments
Leave a Reply
