Formal Languages and Natural Languages
The programing languages we are using has a formal name called "Formal Languages" (FL), here is a short explanation about it
Let's see first what is "Natural Languages" (NL), they are languages that people speak, like English, Spanish, Chinese, etc. Though people try to impose some order in them, they end up evolving with the people that speaks it, that is why in each language you'll see different ways of saying the same thing or having the same word in one language meaning completely different things in other countries speaking the same language, That is why they are called natural.
FL does never evolve by themselves, they are designed by people for specific applications, like mathematicians use a FL that is clear at denoting relationships among numbers and symbols. For programing languages, we can say that they are formal languages that have been designed to express computations.
In mathematics you have syntax rules to express statements like 3 = 2 + 1, so something like 3 = 2 1 + is not acceptable because it does not follow the designed syntax rules for the language. In programming languages it is the same, two aspects of syntax rules can be noted. One of them are tokens being the basic elements of the language such as special characters and words. The second is the structure that specifies the way tokens can be arranged.
Some key aspects that makes FL differ form NL is that FL allows no ambiguity, FL tend to be less redundant than NL witch has a lot of different ways of saying the same thing. NL are full of metaphor where FL are completely literal, one expression will always mean the same thing, no matter the context.
BNF is a way to describe FL and will be the subject of a more advanced and interesting topic I will post later in this blog.
If you are a newbe in Software Development, I will heavily recommend that you to read this book: "How to think like a Computer Scientist". It introduces you from the very beginning going though the fundamental concepts for computer programing and makes you understand in an easy but practical way how can you make programs the way a former Developer would do.

0 comments:
Post a Comment