DeepDharmaधर्म का दीप हिन्दीOpen the app

Why Sanskrit works like a program

A language with its rules written down

About 2,400 years ago the grammarian Pāṇini described Sanskrit in the Aṣṭādhyāyī ("eight chapters"): about 4,000 short rules called sūtras. With them come a list of about 2,000 verb roots (the Dhātupāṭha) and a list of word groups (the Gaṇapāṭha).

The rules work like a computer program. There is a fixed list of sounds. Groups of sounds get short code names. Each rule says: in this situation, change this into that. Rules carry words forward to the next rules, and a few rules decide which rule wins when two could apply. Start with a root and a suffix, apply the rules in order, and a correct word comes out.

Linguists still study this system. In 1967 a computer scientist, Peter Ingerman, suggested calling the notation used to describe programming languages "Pāṇini–Backus form", because Pāṇini had used the same kind of idea. Scholars add that Pāṇini's grammar does more than that notation (rule order, blocking, scope).

One popular claim is not true: NASA never said Sanskrit is "the best language for computers". A 1985 paper by Rick Briggs only compared the way old Indian grammarians analysed meaning with methods used in computer science.

You do not need all 4,000 rules to begin. In these lessons you will learn the sound map, the code names for groups of sounds, how sounds join (sandhi), how roots grow into words, the eight cases, the verb, compounds, and then read a real verse of the Gītā word by word.

Next lesson: The sound map