Subscribe Us

header ads

Natural language vs programming language

We're here to show you what the “C” language is and what we use it for. Let’s consider for a moment what language itself is, not only “C”, but any language people use. We’ll try not to resort to scientific-sounding definitions and, speaking informally, we can say that a language is a tool for expressing and recording human thoughts.

In other words, it's a mechanism known to us and to our partners that allows us all to understand each other and to be understood. We can use our language for speaking, writing, reading, listening, thinking and many others purposes.

At least one language accompanies us throughout our whole lives – it's our native language, our mother tongue, which we learn almost unconsciously at the very beginning of our lives. We will learn other languages, mostly as a result of a conscious decision, perhaps forced by social conditions or business needs, or perhaps simply out of personal interest.



The languages we use to communicate with other people are called natural languages. They were created over many centuries and still are subject to change. If we ignore languages that have been created artificially, such as Esperanto or even Quenya (the language used by the elves in Tolkien's world), we can say that natural languages have evolved almost independently, naturally; an evolution over which we have little or no control.

However, there are languages whose creation and development were and continue to be dictated by specific needs, and their development is fully subject to control by wide groups of people, such as international committees and work groups.

The shapes of these languages are defined by international standards, and although they are understood by many people, the exchange of thoughts between human-beings is not their most important application.

Such languages are, among others, programming languages. You are probably familiar with this concept already. A programming language is defined by a set of certain rigid rules, much more inflexible than any natural language.

For example, these rules determine which symbols (letters, digits, punctuation marks, and so on) could be used in the language. This part of the definition of the language is called lexicon.

Another set of rules determines the appropriate ways of collating the symbols – this is the syntax of the language.

We would also like to be able to recognize the meaning of every statement expressed in the given language – and this is what we call semantics.

Any program we write must be correct in these three ways: lexically, syntactically and semantically, otherwise it will neither run nor produce any acceptable results. You can be sure that in the course of your programming career, you’ll experience all of these errors: to err is human, and these humans write computer programs.

The expressive power of programming languages is much, much weaker than those offered by natural languages. We cannot (although we can try to) use a programming language to express human emotions, and it’s hard to imagine a declaration of love encoded in it. It’s a simple fact that the message embedded inside a computer program is not intended for a human, but for a machine.

Some might ask why we a need a programming language at all. That’s a good question, one we will try to answer for you now.

A computer, even the most technically sophisticated one, is devoid of even a trace of intelligence. You could say that it’s like a well-trained dog – it responds only to a predetermined set of known commands. These recognized commands are very simple. We can imagine that the computer responds to orders like “take that number, add to another and save the result”. A complete set of well-known commands is called an instruction list, sometimes abbreviated to IL. Different types of computers may vary depending on the size of their ILs and the instructions themselves could differ completely from one model to the next.

The IL is in fact the alphabet of a language, commonly known as a machine language. This is the simplest and most primary language we can use to give commands to our computer. We could say that it's the computer’s mother tongue.

Computer programming is the act of composing selected commands (instructions) in the proper order so that a desired effect is produced. The effect itself could be different in each case – it's up to the programmer's imagination, knowledge and experience to determine what that effect should be.


It is possible, and often used in practice, for a computer program to be coded directly in machine language using elementary instructions (orders). This kind of programming is tedious, time consuming and highly prone to a programmer's mistakes. At the early stages of computer technology, it was the only available method of programming and it very quickly revealed some serious flaws. Firstly, programming in machine language requires an exhaustive knowledge of the computer’s hardware design and its internal structure. This also means that replacing the computer with one that differs in design can make the programmer's entire knowledge unusable. Also, the old programs could become completely useless if the new computer “used” a different IL. Thus, a program written for a specific type of computer could be completely useless for other computers and vice versa. Secondly, programs written in machine language are very difficult for humans to understand, including experienced programmers. It also takes a long time to develop programs in machine language, and it’s very costly and cumbersome too.

All these circumstances led to a need for some kind of bridge between the human language (natural language) and the computer language (machine language). That bridge is also a language – an intermediate common language for humans and computers to work together. Such languages are often called high-level programming languages.

A high-level programming language is at least somewhat similar to a natural language; it uses symbols, words and conventions readable to humans. This language enables humans to express complex commands for computers.

You might ask how we make computers understand programs written in this way. Encouragement won’t work, but you can just translate your program into machine language. Moreover, the translation can be done by a computer, making the whole process fast and efficient.

Notice how many benefits you can get from a course this. You don’t need to learn many different machine languages – you just need to know one high-level programming language. If there is a translator designed for a specific computer, your program could be run without any problems. In other words, the programs written in high-level languages could be translated into any number of different machine languages and thus make them usable on many different computers. This feature of high level programming languages is called portability.

Post a Comment

0 Comments