The Artima Developer Community
Sponsored Link

The Human Interface
Tools from the Garden Shack: Natural Programming Language
by Berco Beute
April 16, 2003
Summary
Will programming languages ever reach the expressive power and human readability of natural languages?

Advertisement

In one of his recent articles LISP jock Paul Graham takes a look at the future of programming languages and gives his view on the answer to the question what "kind of programming language [we] will use to write the software controlling [the] flying cars". What follows is an interesting explanation of his notion that "like species, languages will form evolutionary trees, with dead-ends branching off all over". As a LISP adept he, of course, predicts that Java is one of those dead branches, but that aside. The interesting thing is that at the same time a friend of mine send me the following piece of text, please try to read it (I can't find the origin but you can easily type a similar piece yourself, for fun, try communicating with somebody you know without using vowels):

"... randomising letters in the middle of words [has] little or no effect on the ability of skilled readers to understand the text. This is easy to denmtrasote. In a pubiltacion of New Scnieitst you could ramdinose all the letetrs, keipeng the first two and last two the same, and reibadailty would hadrly be aftcfeed. My ansaylis did not come to much beucase the thoery at the time was for shape and senqeuce retigcionon. Saberi's work sugsegts we may have some pofrweul palrlael prsooscers at work. The resaon for this is suerly that idnetiyfing coentnt by paarllel prseocsing speeds up regnicoiton. We only need the first and last two letetrs to spot chganes in meniang."

Did you understand anything of it? You probably did (unless you don't speak English). What struck me, again, is the incomprehensibility of my own brain. Even with a background in cognitive science I'm often amazed by the way a brain can fill in missing information and still come up with the right meaning. The blind spot in your eyes is a well-known example, but the piece of text above is another fine one. Writing your Weblogs in the above language will certainly make it hard for people to find your Weblog using existing search engines, unless their spelling is as bad as the text.

The interesting aspect of the example is that if you look at natural languages as programming languages you could say that humans are really bad coders, syntactically speaking. Their code would be bloated with spelling errors. Besides that they would make all kinds of gross assumptions about the compiler. On the other hand you could say that humans are excellent compilers. Even with corrupt input like the text above humans are able to figure out, partly based on environmental knowledge, what the coder meant to say. So semantically speaking you could say humans are excellent coders in the programming language called 'natural' ('supernatural communication' would be natural++).

The difference between programming languages and natural languages is obvious here; programming languages don't allow for noise, while noise is what makes human communication possible (and interesting, ask any Hendrix fan). Since the receiver allows the sender to be sloppy the chances of a small error causing the communication to break down is brought down. Programming languages don't allow for sloppiness, every statement has to be crystal clear. That's a huge difference.

Returning to Paul Graham's metaphor of programming languages as evolutionary trees (including dead branches), I must say that the above made me once again realize that programming languages are human artifacts. Unfortunately a human trait is to clean things up (for most humans at least), meaning that I doubt whether the human driven 'evolution' in programming languages will lead to a "forgiving" language that enables programmers to build complex things (like real trees, e.g. an oak, for the Java aficionados) using sloppy statements. As of now you could say that most languages only allow programmers to build trees with perpendicular branches and square roots that make no chance of surviving outside the atrium of a NY design museum. Real trees can be beautiful or ugly, but they're always easy to grow and difficult to engineer (ask any Bonsai gardener).

Despite the growing consciousness that programming is more like gardening than like engineering (read for example the interview with Andy Hunt and Dave Thomas), I'm still in doubt whether programming languages are 'organic' enough to grow a garden. That would require a 'natural programming language' that allows for sloppiness and noisy communication. That's the only tool a human could ever grow a mighty oak with: by simply, but carefully, placing a seed.

I guess I'm in favor of Ken Arnold's radical notion that programmers are humans, and that a programming language is the interface between the human and the offered functionality (the API). The consequence of that observation is that we need to make programming languages as much a natural language as possible, since humans are natural built coders/compilers for natural languages. The question then is whether humans themselves can construct such a language, since a defining characteristic of natural languages is that they evolve instead of being engineered. Evolution of a programming language is only possible if individuals are allowed to tweak it as they please. Do programming languages allow for that?

Talk Back!

Have an opinion? Readers have already posted 9 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Berco Beute adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Berco Beute is innovator with the Dutch research & development institute TNO, where his focus is on the human side of distributed systems in the telecom industry. He has a Master's degree in both mass communication and artificial intelligence, and a PhD in distributed multimedia. Besides software engineering his interest is using software for cognitive science and creating multimedia.

This weblog entry is Copyright © 2003 Berco Beute. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use