Recently I came across a mail titled ‘Facts to make every Indian proud’. I am sure everyone would have received it or read it somewhere. If you can recollect, there is a line that says ‘According to Forbes magazine in 1987, Sanskrit is the most suitable and precise language for programming’. Nothing can be more motivating for me to explore its credibility than my love for programming. Sanskrit is a language that has been in use, yes in use, for over 6000 years of known history. It is the mother of all Indian languages. I can barely read and understand this language thanks to my two years of studying it in school. Initially when I found that such a claim was not made in the magazine that year, I was shocked. How can someone state something like that? Something told me to keep searching. Probably it is the love for Sanskrit that said it. After some more searching and lots of reading, I finally understood what it meant. It sure did help me broaden my perspective about certain things. I am sure this post on my understandings will help broaden yours too.
It is natural for anything that has been around for such a long time to undergo a lot of changes. Surprisingly, the grammar and everything pertaining to the communicating part of it never changed after 400 BC. But the language gradually died off and none used it. Now like renaissance, scientists are using it for Natural Language Processing and Artificial Intelligence. Too much of a change from being a language of communication to a research specimen.
Till 400 BC there were several changes in the grammar of the language. But in 400 BC, a Sanskrit scholar named Panini sat down and decided to set things right. And boy, this fellow had some talent. He set the standards so well that since then, using Sanskrit once can convey super-exactly what is needed. His standards never required a revision. Till present time! It clearly out did the previous revisions and many people even forgot the fact that there were revisions before this.
He used three notations.
1. Angular brackets ” are used to enclose suggestive names
2. The meta-result of an action is always written on the right side
3. Structures similar to ‘|’ which means ‘or’ were also used
Several centuries later in 1958-60, the structure of formal programming languages was introduced by two eminent scientists Backus and Naur. It is shortly known as the BNF notation. It states how a large class of numerical problems can be represented in a concise form so that it can be converted to any programming language easily. They gave just 3 notations.
1. Use the angular brackets ” to represent category names.
2. Use ‘|’ to represent ‘or’
3. ‘Is defined as’ is written as :=
Strikingly similar? Someone noted this and that marked the revival of Sanskrit.
Researchers working on robots that can understand the way we speak naturally and respond to it correctly faced a serious problem. The syntax of our present language is very abstruse to the meaning. For example, the sentences ‘Raju gave Ramu the ball’ and ‘The ball was given to Ramu by Raju’ are of same meaning. But it is tough to make a computer understand this fact. So they decided to break the sentences into simpler components called semantics and hence interpret the sentence. The above sentence has the following components
Starting Agent: Raju
Ending Agent: Ramu
This solved only a fraction of their issue. Look at this statement: ‘Raju gives the ball’. Several questions arise out of this when we want to process it. Who does he give it to? Why does he give the ball? Is his hand in the process of giving the ball? Is he about to give it? and so many other questions. They were not able to solve this in the early 70s when research in this field took off.
One last issue they had was that words that we use assume meanings and attributes based on the context. For example, the statement ‘I read’ can be past tense or present tense. Only the context can answer that. These two issues kept them stagnant for a long time until they realized that Sanskrit had the answer.
Every statement in Sanskrit answers all the questions asked above exactly. A simple action of a leaf falling is said as ‘Because of the wind, the leaf falls from the tree to the ground’. Believe me, every statement is made like this while speaking and writing. The syntactical categories like agents, action, object (both direct and indirect), auxiliaries like nouns, adjectives etc and one of the six case endings were clearly defined in every sentence. Hence when something is said in Sanskrit, it gives us all the information to the minutest detail required for processing. This solves the first issue.
The second issue is very easy. Every lexical item has a one-one correspondence in Sanskrit. So a word used in some place means the same when used elsewhere too. Second problem is also addressed hence. So they decided that when we speak to robots in Sanskrit, Natural Language Processing can be done easily. One Nasa scientist even made a paper on this.
Based on the above two facts, I think the claim that ‘Sanskrit is the best language for programming’ is correct. Sanskrit is not a programming language, but heck everything in computers right from distributed computing to pipeline is inspired by real-life entities and so, it can be rightly said that Natural Language Processing and programming languages took inspiration from Sanskrit.
It is well known that some highly intellectual sages and kings used Sanskrit to convey two entirely contradicting interpretations of the same statement. But whatever interpretation was used, it is super-exact. I am eager to know how the researchers are going to handle this fact.
I am happy for the fact that rest of the world has now started to recognize the amazing things India houses. Probably centuries before they existed in our country, but still its ours! It is equally sad that we Indians don’t recognize it anymore. One such thing is Vedic Maths. I shall write about in some future post. So until then, take care!
Looking forward to your comments, shouts, flames, more points and anything else! Basically I ‘ll be glad if you respond. Write at least a ‘good post’ if you like this 🙂