A Brief Study: Spoken and Programming Languages
And now for something completely different.
A programming language allows a human to talk to a computer, in the same way that a spoken language allows a human to talk to another human. Now that we’ve cleared that up, let’s consider what programming and spoken languages have in common.
They both have a predefined vocabulary. In C++, you cannot use the keyword “method” to define a class method in the same way that I can’t refer to dogs as “woofs” due to the sound they make. Both are invalid according to the established rules of the language.
They both have a predefined syntax. In C# you cannot decide to invert the object and method in a call (ToString.myObject() for example) in the same way I cannot say “my a mess is hair” in English. Neither are syntactically correct and would not be understood by the compiler or human trying to understand it.
They both have conventions. Programming languages have conventions for naming identifiers (camel, Pascal, Hungarian notation etc), while spoken languages (in written form) have conventions for casing places and names.
A new programming language is often created by taking the good bits of previous languages and adding new features to satisfy changing requirements. Sometimes the syntax is made more elegant or completely changed to make the language easier to understand and less error-prone.
Spoken languages are similar in that they evolve and inherit new words, but over a much greater period of time. English has adopted words from various other languages and evolved into what we have today – just like Java was developed with the influence of C and C++. In English, we added words like Internet and Google. In java we added things like garbage collection and interfaces.
The biggest difference between programming and spoken language evolution is dependency. A programming language may evolve while remaining backward compatible, but eventually that evolution moves on to the stage where an entirely new language is created. The new language is able to make bigger decisions about its design because it doesn’t have any dependencies. When C# was first developed, they were able to make the decision to remove multiple inheritance because this decision wasn’t going to break anything. They were free to design the language without having to keep the perceived badness of predecessors.
Spoken languages do not evolve like this. A spoken language cannot be completely renovated because there’s a huge dependency in the form of millions of speakers, who simply won’t learn the new version of the language. Ask yourself what would happen if we decided to remove the indefinite article from English. No longer is it valid to say “a cat is sitting on the wall”, but now you must say “cat is sitting on the wall”. The answer is obvious, no one would care and they would continue to use the previous form – because that’s the one they know. The vast majority of speakers don’t learn English because they’re interested in its merits; they learn it because they are born into it, and probably never even consider how it could be improved.
Most native speakers of a language know what they need to know and certainly wouldn’t want their language to change. A change would do nothing but inconvenience them, even if it made the language 10 times better in terms of how easy it is to learn, how easy it is to teach and how consistent it is. Native speakers understand the inconsistency, they have already learnt the language and they aren’t teaching it. A comparative example is a programmer who continues to write new web applications in classic ASP, despite the fact there are more efficient and productive platforms available.
Some people will claim: if it ain’t broke, don’t fix it. But wait, what’s your definition of broken? English and classic ASP may not be broken for you but that doesn’t mean they’re not broken for other people. Millions of people attempt to learn a spoken language (increasingly English) and are forced to learn many rules, many exceptions to those rules and accept the fact that parts of the language can’t be explained with a rule, as it varies with dialects and idioms. Did you know that Papua New Guinea has over 850 indigenous languages with a population of just 6 million people? Why not just one language? How much money might be saved in the long run if there were just a single language?
Personally I find it rather depressing that a person can spend 6 years of their life learning English and still not have a good command of the language. This should not be the case – but alas, English wasn’t designed to be learnt, in fact it wasn’t designed at all. This is the problem.
Should languages be designed? In 1928, the Turkish President Mustafa Kemal Atatürk commissioned a series of reforms which included some major changes to the Turkish language. Atatürk’s Reforms included a completely new alphabet and the removal of adapted words in a grand plan of modernisation. The majority of the population willingly accepted the reforms, and today there is no doubt that these reforms are part of Turkey’s success as a modern country.
Ignoring the practical concerns for a second, there is no doubt in my mind that spoken languages should be designed; they should be designed to serve their intended purpose in the best way possible. Imagine what programming would look like today if our current programming language was simply an evolution of assembly language with bits added as needed, with no conscious redesign ever taking place. For a spoken language like English, the implications of a complete redesign are too great for it to happen, but like programming languages, this has happened by way of a completely new language.
Few people understood this better than Ludwik Zamenhof, who in 1887 created the international auxiliary language Esperanto. Zamenhof’s goal was to create an easy and flexible language that would serve as a universal second language to foster peace and international understanding. Imagine Ruby as a spoken language, and you get close to what Esperanto is all about.
Finally! Someone understood that a language should be designed to meet its goals of being easy and reliable, and best of all, why can’t everyone learn it? Zamenhof knew that no matter how hard one tried, one would never be as fluent as a native speaker in learning a new language. What’s more, with an average of between 5 and 10 years to acquire fluency in English, how much are we hindering our international communication efforts by having people waste time learning ancient inherited rules and exceptions?
A few short months of learning Esperanto is enough to attain a reasonable command of the language, instantly allowing you to communicate with fellow speakers – regardless of their homeland. Unlike almost any other spoken language, Esperanto has been designed. Looking at Esperanto as a programmer, you can’t help but appreciate the rules and structure as you come to understand that this structure allows a speaker to hear constructions they have never heard before and still understand them. By way of a simple example, let me introduce you to Esperanto.
Saluton, mi estas Martin kaj mi amas Esperanton ĉar ĝi estas tre facila lerni kaj amuzega paroli.
Before I explain what the sentence above says, I’ll explain some of the basic rules which will help you disassemble the sentence structure.
|Singular (subject)||ends on|
|Plural (subject)||ends ojn|
Consider for a second what you can infer about Esperanto text with the knowledge from above. You can now safely assume that the Esperanto word “kantas” is a present tense verb. You don’t know what it means, but you do know it’s a doing-word that is occurring in the present time. If I told you the root word kant refers to song, you can now conclude that kantas means “singing”. You also now know how to say song and songs by applying the noun rules from above.
Hopefully you are seeing my point. Esperanto’s structure and rules go much deeper than this, and the net effect is that you don’t need to be concerned with exceptions such as feet being the plural form of foot. Esperanto removes the exceptions and replaces them with universal rules – reducing the basic required vocabulary greatly. Just as Java removed the concern of freeing memory by way of garbage collection, Esperanto removes the concern of remembering lots of useless exceptions by way of meaningful rules.
In English I cannot really reason about a word – not at least without the aid of a dictionary. I cannot make any assumption because I know too well that my assumption might be wrong due to an inconsistency or an exception to the rule (a suffix of -s does not always indicate the plural form, e.g. deer or sheep). In contrast, an Esperanto speaker can reason about a new word. In fact they can effectively disassemble the word until its meaning is clear, or very easy to locate.
Breaking the example sentence down, we can observe the rules and structure like so:
|Saluton||Hello||Standard Esperanto greeting.|
|mi||I||Comes before verb, as in English “I am” –> “mi estas”|
|estas||am||Present tense verb form of “to be”. Change the suffix to –is and you have “was”.|
|Martin||Martin||My name is the same.|
|kaj||and||Standard Esperanto conjunction.|
|amas||love||Present tense verb form of “to love”. Change the suffix to –is and you have “loved”. –os would be “will love”.|
|Esperanton||Esperanto||Subject noun due to –on suffix. This noun is what the sentence is about.|
|ĉar||because||Standard Esperanto conjunction.|
|ĝi||it||Similar to the “mi” pronoun. You also have ŝi “she” too.|
|estas||is||Same form as before, but due to context we translate to “is”, as it makes most sense than “am”.|
|tre||very||Standard Esperanto adverb. Comes before word like in English: “very easy”, “very hard”.|
|facila||easy||Adjective due to –a suffix, like “bela” for “beautiful”.|
|lerni||to learn||Infinitive verb form of “learn”, which in English is translated with a “to” before it. E.g. “kanti” is “to sing”.|
|kaj||and||Standard Esperanto conjunction.|
|amuzega||extremely fun||The root word “amuz” means fun. The suffix is –a so it’s an adjective. The extra “eg” part means "make very big”. E.g. “granda” is “big”, but “grandega” is “huge”.|
|paroli||to speak||Infinitive verb form of “speak”, which is translated to English with a prefix of “to” so it makes sense.|
So there you have it. An example of a language that has been designed to be consistent and programmable. Speakers of Esperanto don’t have to remember every single variant of every single word, but rather learn a root base and apply transformations to those roots to form the structure of the sentence.
Imagine if current spoken languages had this strong design from the beginning? A dream? Sure… but it’s certainly interesting to think about. I’ll leave you with a quote from The Lord of the Rings author J. R. R. Tolkien:
My advice to all who have the time or inclination to concern themselves with the international language movement would be: "Back Esperanto loyally."
Multe dankon por legi.