Monday, June 1, 2009

sanskrIT – The Next Generation Computer Programming Language


Ever since 1786, when Sir William Jones, in a paper presented to the Royal Asiatic Society, in Calcutta, said, "the wonderful structure" of the Sanskrit language, is "more perfect than the Greek, more copious than the Latin, and more exquisitely refined than either," the West has been busy learning from Sanskrit. This Western passion for the oriental classics is visible in Peter Brook’s brilliant dramatic rendering of the Sanskrit epic, Mahabharata,

While we in India today consider Sanskrit a dead language, the Westerners consider it as simply a fascinating language, a language in which the genius of the human civilization was perfected to its fullest. 

In July 1987, Forbes magazine published news, which surprised even the Sanskrit pundits. It said that, “Sanskrit is the most convenient language for computer software programming.” It filled the hearts of all those who love and study Sanskrit with great joy and enthusiasm as it opened the doors to new fascinating world of Sanskrit studies. 

Sanskrit is extremely rich, powerful and expressive language. It potentialities are gradually being appreciated all over the world, and its application is being extended in different field. It is said to be between 5,000 and 7,000 years old. It was developed in the Indian sub-continent and passed from generation to generation in oral traditions for millennia before it made an appearance in written form. The oldest example of written Sanskrit is thought to be the Rigveda, a key Hindu text written about 1,700 BC. The grammar and phonology of this ancient tongue was recorded in great detail in the 5th century BC by an Indian linguist/grammarian named Panini.

Sanskrit (meaning "cultured or refined"), is the oldest and the most systematic language in the world. The vastness and the versatility, and power of expression can be appreciated by the fact that this language has 65 words to describe various forms of earth, 67 words for water, and over 250 words to describe rainfall. 

The Sanskrit grammarians wished to construct a perfect language, which would belong to no one and thus belong to all, which would not develop but remain an ideal instrument of communication and culture for all peoples and all time.

The idea of Sanskrit as programming language seems to stem from NASA researcher Rick Briggs' 1985 paper, "Knowledge Representation in Sanskrit and Artificial Intelligence," AI Magazine Vol 6, #1, 1985.

Briggs proposed Sanskrit as a good language for AI-style knowledge representation, i.e. for machine representation of knowledge expressed in a structured form, based on natural language. Sanskrit is apparently well-suited to this application, partly because of its systematized grammar, and its relative lack of ambiguity. Briggs pointed out correspondences between KR structures used in AI, and equivalent structures in Sanskrit. 

Oops! What a language!

In English, the "object" of a sentence is the receiver of an action. For example, in the sentence, "Click the button", the "button" is the object.” Unfortunately, in programming things called "objects" perform "actions". In this sense they are more akin to the English grammar "subject". 


The term object-oriented programming originally comes from the systems development and computer programming world. After years of programming and systems development, someone realized that there are many repetitive functions. For example, file adds, changes, and deletes occur frequently and during multiple processes. It would seem reasonable that one add-change-delete routine could be developed in a modular form that could be accessed any time an add-change-delete process needed to occur. Developers grouped these functions into accessible and executable modules that became known as objects. Developing programs using objects became known as object-oriented programming (OOP).

The design of the OOP process came partially out of a reaction to the slow development time for computer programs, and partly because of the high demand for computer developers. Using object-oriented programming, fewer people can accomplish more.

All modern languages have etymological roots in classical languages. And some say all Indo-European languages are rooted in Sanskrit, but let us not get lost in that debate. Words in Sanskrit are instances of pre-defined classes, a concept that drives object oriented programming [OOP] today. For example, in English 'cow' is a just a sound assigned to mean a particular animal. But if you drill down the word 'gau' --Sanskrit for 'cow'-- you will arrive at a broad class 'gam' which means 'to move. From these derive 'gamanam', 'gatih' etc which are variations of 'movement'. All words have this OOP approach, except that defined classes in Sanskrit are so exhaustive that they cover the material and abstract --indeed cosmic-- experiences known to man. So in Sanskrit the connection is more than etymological.

No comments:

Post a Comment