Is Sanskrit the most suitable language for computer software?

Although this might be just another UL, I have read in various places (some of them corroborating the source as FORBES) that apparently Sanskrit has been found to be the most suitable language for computer software.

I assume this means that you can use the language syntax to program a set of instructions far more easily in the original Sanskrit than in any other language; hence Sanskrit is meant to be more compatible for this type of task than any other language.

I would have taken most of this with a grain of salt had it not been mentioned to me a while back by a good (Indian) friend of mine. I don’t know whether he was saying it as a matter of pride or what, but he didn’t know about my having read all this stuff before he mentioned it.
Okay, so what’s the SD?

[For those who don’t know, Sanskrit is an ancient language originating from India, with written form too]

Well, it’s ridiculous just on the face of it, because there’s no “one most suitable computer language”, even among the existing languages. You choose a language for a given task.

What * is * possible, as you suspect, is that the * syntax * of Sanskrit more closely resembles the syntax of a programming language than any other known “natural” language. In order to be parsed by computers, programming languages usually have a very simple, rigid syntax that is designed, as far as possible, to be unambiguous. Ideally, you want to be able to generate a parse tree (sort of) with the minimum amount of backtracking – in fact, if you allow lookahead, backtracking can usually be avoided.

Source

Seems to be mostly a UL, I could be wrong though.

      • I would think that the most suitable languge for computer software would be Assembler. The reason is that (if I remember right) it is the only language that directly translates back and forth between machine and program source code. There is no compiler, just an interpreter that works forwards and backwards.
        ~

Actually, disassembling code from machine into assembler is nontrivial. At the very least, you lose the mnemonic variable names, so the code is virtually unreadable.

This is probably the case, as the grammar of Classical Sanskrit, as opposed to Vedic Sanskrit, is an artificial deliberate contraption.

I don’t see where it says in your link that Classical Sanskrit’s grammar is an artificial construct. What I did see is a very glowing description of Panini’s method as a descriptivist analysis of the language he examined.

On an unrelated note regarding your username: I know that a single line on each side of a value is the symbol for absolute value, but I don’t know what a double line on each side indicates. Anyway, what is the absolute value of Gyan? (I know, silly questions.)

WAG: The || on either side is just decorative, like a border. I think ||A|| is the magnitude of vector A, though I don’t know why you can’t use |A| to mean that.

Further examination, involving copy-paste and font-switching, reveals that they are the letter I, not the | symbol. “Gyan II” would be “Gyan the second” but the ones before the name still don’t make sense. I still say it’s probably decoration.

Gets glared at by a mod

Okay, sorry! I’m leaving now.

Complements of Wikipedia

Thanks!

The language most suitable for computer programming is the one with the feature set that best solves the problem at hand. Of course, among the various modern languages, most are good enough for whatever you’re trying to do.

|| and |||| both carry a sense of describing how large an object is. |||| seems to be reserved for vector norms, though, and you’ll occasionally see || used in that context anyway.

My guess is that the “||”'s in Gyan’s username are meant to represent the “double danda”, a punctuation/graphic ornamentation mark in some Indic languages, including Sanskrit and Hindi.

[Checks Hindi version of Harry Potter book]… actually, it looks as though modern Hindi uses the single danda “|” exclusively. Sanskrit uses both, though.

Old Indo-Aryan or “Vedic Sanskrit” evolved into what is known as “Classical” Sanskrit via forms known as “late Vedic”, “Epic”, etc. What fixed “Classical” Sanskrit as the standard form of the language from antiquity up to the present was Panini’s brilliant codification of its grammar, including a depth of grammatical analysis not equaled until the days of modern linguistics (whose birth was in fact largely inspired by 18th- and 19th-century philologists’ encounters with Sanskrit grammatical theory).

However, although Paninian Sanskrit is indeed very well analyzed and logically constructed, as well as being an incredibly beautiful language, it would be an absolute bitch to code in. For one thing, its standard script, nagari, has many more characters than roman script, so you would need all sorts of diacritical marks to read a roman version of the code (or else you’d need nagari fonts and the ability to read nagari). For another, Sanskrit is morphologically very complex, with seven declensional cases for nouns and a whole host of verb forms that we don’t have in most modern languages. And most importantly, the spelling of Sanskrit words changes according to their phonetic context, a feature called “sandhi” or combination, and this feature is exploited in building long compound words with ambiguous meanings.

I have no idea where the idea came from that Sanskrit would make a suitable programming language, but I bet the process went something like this:

  1. Sanskrit has a very sophisticated and well-analyzed grammatical structure, as codified by Panini in the late first millennium BCE.

  2. Paninian grammar has a lot of similarities with structures in modern linguistics and artificial languages, and Indologists have exploited them in developing machine-parsing software for Sanskrit texts. (A sample article (PDF) discussing such attempts.)

  3. Gee, that must mean that Sanskrit itself is an ideal language for computing!

(1) and (2) are okay, but (3) is just a leap to conclusions by somebody who didn’t understand them very well.

Oh, and that may apply also to the writer of the linked Wikipedia article, who seems to have conflated Panini’s “Shiva Sutras”, a series of concise mnemonics for identifying all Sanskrit phonemes, with the later (9th c. CE) devotional/philosophical work of the same name which is a foundational text of Kashmiri Shaivism.

Forbes as a source? Heck, why not People? or TV Guide?

I agree. Programming isn’t exactly the most accessable field to those who focus on something else, and it’s easy to understand things halfway and end up spouting absolute nonsense that sounds reasonable to other outsiders.

In that respect, it’s much like any other technical field.

Ye gods, no! We gave up doing everything in assembler in the 1950s, when FORTRAN and COBOL were invented. (There were plenty of earlier efforts, called ‘autocoders’ because they automatically generated assembly code from semi-algebraic statements, but FORTRAN and COBOL were the first high-level languages to outlive a specific machine and are, in fact, still in widespread use.) This is because assembler is mind-crushingly tedious and very difficult to write in a way that’s comprehensible to anyone else, or to the original programmer a few weeks after the fact. The very early dialects of FORTRAN and COBOL have very few supporters these days, but they were adopted because assembly is usually the worst language to use for a given task.

This is very true on both counts. It should be pointed out, though, that which language is chosen depends less on the exact features of the language and more on the other source code programs written in that language can easily leverage. This is perhaps the biggest reason new software is still written in FORTRAN and COBOL.

There seems to be some misunderstanding about what a programming language is for. It is not meant to make to be easy for the computer, it is meant to make it easy for the human. Perhaps the title for the OP should be: Is Sanskrit the most suitable language for computer programmers?

The answer would still be “no”, unless the programmers in question were already familiar with Sanskrit and communicated most easily in that language. For anyone else, Sanskrit’s grammatical elegance would not compensate for the difficulties in learning its complicated script, grammar, and vocabulary.

(However, there might be a case to be made for the argument that all programmers, or at least all artificial language designers, should have to study a little Sanskrit along with the basics of Paninian grammar, so that they can get a feeling for the richness of its linguistic analysis and the ways it inspired modern linguistic concepts. This would be akin to making medical students learn Latin and Greek so they get a fuller understanding of medical terminology and its history. But these are speculative pedagogical ideas and have no bearing on the practical use of Sanskrit in computer programming.)

Well, Classical Sanskrit wasn’t spoken in the streets. It “evolved” into a refined codified language by these grammarians. When I said “artificial”, I didn’t mean to imply, “from scratch”.

Kimstu has it. Many Sanskrit texts use the double danda as a delimiter.

May I ask what you are by training?

You seem to have a broad knowledge base encapsulating mathematics, linguistics and philosophy.

An undergrad in math.