# Is Sanskrit the most suitable language for computer software?

**URL:** <https://boards.straightdope.com/t/is-sanskrit-the-most-suitable-language-for-computer-software/315050>\
**Category:** Factual Questions\
**Created:** [July 31, 2005, 11:31pm UTC](https://boards.straightdope.com/t/is-sanskrit-the-most-suitable-language-for-computer-software/315050 "2005-07-31T23:31:00Z")\
**Posts on this page:** 5\
**Page:** 3

<div class="post-metadata">

**Author:** ![Excalibre](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@Excalibre](https://boards.straightdope.com/u/Excalibre)\
**Post date:** [August 2, 2005, 7:35am UTC](https://boards.straightdope.com/t/is-sanskrit-the-most-suitable-language-for-computer-software/315050/41 "2005-08-02T07:35:09Z")

</div>

> [@ultrafilter](#):
>
> Either way, it doesn’t sound like your average Indian programmer would be fluent in Sanskrit. Thanks.

Certainly not. Knowledge of Sanskrit is a specialized thing. However, I believe there’s a newspaper (maybe more than one?) published in Sanskrit. It’s not entirely confined to liturgical use as Latin is.

---

<div class="post-metadata">

**Author:** ![Monty](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/monty/32/47_2.png) [@Monty](https://boards.straightdope.com/u/Monty)\
**Post date:** [August 2, 2005, 9:09am UTC](https://boards.straightdope.com/t/is-sanskrit-the-most-suitable-language-for-computer-software/315050/42 "2005-08-02T09:09:46Z")

</div>

> [@II Gyan II](#):
>
> > [@](#):
> >
> > Originally Posted by ultrafilter  
> > Is Sanskrit a living language?
> 
> Supposedly. A few years back, the TeeVee showed a couple of villages in Bangalore that conversed in Sanskrit. There were also a few newspaper articles. Of course, such reporting is gospel, so the ‘supposedly’ at the beginning is blasphemy.

Well, we can go with [the Ethnologue’s page on India](http://www.ethnologue.com/show_country.asp?name=IN) and see Sanskrit listed among the living languages there. The Ethnologue’s [page on Sanskrit](http://www.ethnologue.com/show_language.asp?code=san) itself gives the number of native speakers (speakers for whom Sanskrit is their first language) as 6,106 as of the 1981 census and 194,433 speakers for whom it is their second language.

---

<div class="post-metadata">

**Author:** ![Kimstu](https://avatars.discourse-cdn.com/v4/letter/k/ecd19e/32.png) [@Kimstu](https://boards.straightdope.com/u/Kimstu)\
**Post date:** [August 2, 2005, 9:22am UTC](https://boards.straightdope.com/t/is-sanskrit-the-most-suitable-language-for-computer-software/315050/43 "2005-08-02T09:22:22Z")

</div>

Sanskrit is definitely still an “active learned” language as well as a liturgical one (for Hindu religious rituals). There are Sanskrit-speaking clubs, publications, etc.; I’ve been to a couple of Indological conferences where the easiest medium of communication between some elderly traditional scholars from India and Indologists from the West has been spoken Sanskrit!

A lot of the political atmosphere surrounding Sanskrit these days has to do with Indian “Hindutva” politics, a nationalist/communalist/cultural-unification movement insisting on the supremacy of “indigenous” features such as Hindu rituals, the caste system, the Sanskrit language, etc. So there are lots of enthusiastic Indian “Sanskrit-boosters” who have been influenced by Hindutva rhetoric but don’t actually know very much about the details and history of the language. I think the people who call Sanskrit an ideal language for computing probably fall into that category.

And no, Sanskrit is no longer considered a significant “living” or primary language, having been replaced in that respect (as far back as late antiquity) by various vernaculars descended from it (Bengali, Marathi, etc.), just as Latin was replaced by European vernaculars but continued to be widely used as a language of liturgy and scholarship. As noted, there are a few villages where people still speak a local vernacular close enough to Classical Sanskrit to be identified with it, but the vast majority of the Sanskrit spoken today (or at any time within the past couple of thousand years, really) is a secondary or learned language for its speakers.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [August 3, 2005, 5:25am UTC](https://boards.straightdope.com/t/is-sanskrit-the-most-suitable-language-for-computer-software/315050/44 "2005-08-03T05:25:42Z")

</div>

> [@DougC](#):
>
> Seems to me the first matter of business is to switch to a programming language that allows accurate two-way translation. Does any other [than assembly] language allow that?  
> ~

Assembly doesn’t even allow that. Look at it this way (code is from [here](http://linuxant.hit.bg/Assembly-HOWTO-6.html)):

```auto

;; Assembly looks like this.
; This specific code is for Linux running on a 32-bit Intel chip
; it absolutely will not run on any other OS/hardware pair.
; It is also dependent on the NASM assembler.
section .data
msg db "Hello, world!",0xA ;our dear string
len equ $ - msg ;length of our dear string
section .text ;section declaration
    global _start
_start:
;write our string to stdout
        mov eax,4 ;system call number (sys_write)
        mov ebx,1 ;first argument: file handle (stdout)
        mov ecx,msg ;second argument: pointer to message to write
        mov edx,len ;third argument: message length
        int 0x80 ;call kernel
;and exit
        mov eax,1 ;system call number (sys_exit)
        xor ebx,ebx ;first syscall argument: exit code
        int 0x80 ;call kernel

```

Here is how it looks after assembly and disassembly:

```auto

hello.o: file format elf32-i386

Disassembly of section .text:

00000000 <_start>:
   0: b8 04 00 00 00 mov eax,0x4
   5: bb 01 00 00 00 mov ebx,0x1
   a: b9 00 00 00 00 mov ecx,0x0
   f: ba 0e 00 00 00 mov edx,0xe
  14: cd 80 int 0x80
  16: b8 01 00 00 00 mov eax,0x1
  1b: 31 db xor ebx,ebx
  1d: cd 80 int 0x80

```

(Since this is only a disassembly of the section that contains the executable code, the data is lost.) In translating from assembly to object file to disassembled file, you lose all of the comments, names, and other structure not inherient to the machine code itself. It is very difficult to debug, and it becomes effectively impossible once the program becomes in any way complex.

It’s a hell of a lot easier to use open-source code and make changes to the sources like normal people.

---

<div class="post-metadata">

**Author:** ![Bytegeist](https://avatars.discourse-cdn.com/v4/letter/b/9dc877/32.png) [@Bytegeist](https://boards.straightdope.com/u/Bytegeist)\
**Post date:** [August 3, 2005, 1:26pm UTC](https://boards.straightdope.com/t/is-sanskrit-the-most-suitable-language-for-computer-software/315050/45 "2005-08-03T13:26:50Z")

</div>

> [@Derleth](#):
>
> Here is how it looks after assembly and disassembly: …
> 
> ```auto
> 
> ```

You know, that _does_ look a bit like Sanskrit after all.

😃

[Previous page](https://boards.straightdope.com/t/is-sanskrit-the-most-suitable-language-for-computer-software/315050.md?page=2)
