Lots of researches are going on Computers and its working. Computer is a machine that performs an action as directed. But to direct an action to a computer you need to tell it in its own language which is 0 & 1. Writing a command for a computer to perform an action is called programming. In early times highly trained professionals used to write programs and commands in Machine Language which is 0 and 1 however soon it was realized that writing code in machine language is pretty hard and not an effective way.
Thus Assembly Language was soon made which used small pre-determined Nemonics and convert it to Machine Language. It was pretty hard too and very few people used to understand it. But with researches new and new programming languages were made with time and Programming languages started to become easier. Some Famous historic, as well as present Programming languages, are given below
(Ordered by Oldest to Newest)
14- JAVA SCRIPT
17- Visual Basic
So as you can see all of these are some of the many Computer Languages. You can these languages and their rules to start programming and coding. All of them have their rules and grammar, the written code is them interpreted to Machine Language which Computer can understand.
But ever wondered why Programming languages are not in Natural Languages like English, Spanish, French etc. If we can made interpreters than they can change our code written in English or any other language to Machine Language. But there is no Language like that and may be they will never be made either. Here are 2 main reasons why
1- Language Ambiguity
Ambiguity means “the quality of being open to more than one interpretation; inexactness“.
It means that Natural Languages have sentences from which many means can be extracted so if we would try to give a command to computer with that phrase from which multiple meanings can be extracted then it would be difficult for the computer to understand and process that statement as it wouldn’t know in what meaning and context Programmer is giving the command.
How would the computer know in what meaning programmer wants computer to understand?
Let me explain this with an example
We want to make a software for an office of 25 employs to pay its employs their Salary Biweekly.
Now if we look at the meaning of Biweekly in the dictionary it is following
So Biweekly have 2 meanings, now if a programmer wants Computer to give salaries bi-weekly then how would computer know which meaning it should consider.
And this was just a small example there are so many words with several meanings, even the most common words we use can be considered in various meanings. There are thousands of phrases and idioms we use that can be interpreted in different meanings and computer won’t understand. We hear the tone and look at the expression then we understand in what context other person is saying something. But computer won’t know the tone and expressions in which someone is saying something. Words are interpreted differently in different areas as well as by different people.
Let’s have another example of how much ambiguous some sentences can be
“We saw her duck”
- We looked at a duck that belonged to her.
- We looked at her quickly squat down to avoid something.
- We use a saw to cut her duck.
So it shows that due to Ambiguity of Natural languages they would not be very effective in writing programs and coding softwares.
Natural languages have rich Grammar but most of the people don’t use full grammar sentence and usually shorten them or some people miss some compound words. Just Like if someone tells you “I not like this” you would know that person wants to say “I don’t like this”. But a computer won’t understand and it will give an error. Just like this small example there are thousands of sentence which are shortened by Humans for their ease but we still understand however computer won’t be able to understand.
Even if we are able to write every single sentence according to grammar than our code will become so large that it would take more time and more work to complete a task.
This concludes that programming in Natural language is hard and may never be made due to their ambiguity and verbosity but if we are able to develop a computer wise enough to understand what we are trying to say at different times by different people then may be in future we could code in human language.