Can anyone invent a new programming language?
- March 27, 2020
- Posted by: Sakher
- Category: Blog
Many institutes and colleges require students in advanced years to design a new programming language, to be a practical application of compiler design, so it is not difficult or it requires rare knowledge as some imagine.
for every human language spoken is specific spelling rules, and these rules are many, but they are often simple; for example, in our Arabic language, we put two points (:) after the verbs of the saying, and we draw an expressive movement at the end of the word to distinguish it from others; if you read a phrase like: (beautiful gold) You do not know what is meant by the word (gold), or is it the precious metal? Or did he leave? Likewise, the author of the programming language puts the spelling and grammatical rules of the new language in order to remove ambiguity and avoid confusions (confusion is the ability to interpret one sentence in more than one way
We have to differentiate between three main players: the programming language designer, the programmer, and the end-user. The author of the programming language writes Syntax spelling rules for the language that he is familiar with, then the programmer comes and learns these rules and master the necessary basic skills that each programming language must include.
Known from programming by necessity!
Many literatures in programming decide that a programming language must allow the programmer to perform five basic operations:
1- Testing: to test a condition (is 4 * 5 greater than 3 * 7?). // sign * means multiplied by.
2- assignment: to store some data in the volume and give it unique names; for example, y = 3 means: store number 3 in the memory with a title named y.
3- Reading: to receive entries; for example, when you write a comment on a post and press the enter button on the keyboard, your comment and its assignment are retracted to an address in the memory to perform some operations on it.
4- Writing (printing): to write the information; in fact, everything that you see on the screen – even this publication – would not have appeared without the programmer using a software feature to write these words in this place.
5- Looping: to repeat a set of instructions. For example, Facebook keeps all the comments of a post in a table, then passes the lines of this table line by line looping loop and in each iteration pulls a comment and writes it in place.
The main skill that must be practiced in creating a programming language is the skill of expressing an infinite number of code with an infinite number of grammar rules!! To clarify the meaning, we give the following simple example: In the Arabic language, we have a rule that expresses the actual sentence in the following form: (sentence = verb + subject + object). This is one rule from which we can derive a huge number of sentences such as (the boy wrote the lesson, my brother ate the apple, Ahmed carried the bag … etc.). And we can express the actual sentence also in the following way: (the sentence = verb + subject + preposition + prepositional phrase) and we derive many phrases from this sentence such as (the child ascended to the bus, the professor wrote on the blackboard.etc). In exactly the same way, the author of the programming language must write a limited number of grammatical rules for his programming language so that these rules accommodate any valid code that the programmer may write in the future. The language designer uses a tool, such as JavaCC, to read the code and test the compatibility of this code for the spelling and grammar rules compiled by the language designer. If the code succeeds in this test, it is ready to run on various devices.
Cannot one programing language be enough for us?
Once you finish writing the grammar of the programming language (spelling and grammar), modifying these rules is very difficult and sometimes almost impossible! Also, we have to know that designing a programming language is never absurd, but the programming language is designed for a specific need and goal; when the FORTRAN language appeared in 1954, there was no internet or even 3D games, and therefore we need a new programming language to develop applications and software in those New domains.
we have already indicated in the introduction to the research that many colleges of computer science and institutes instruct their students to design a programming language that engineers draw the outlines of, and therefore the issue is not miraculous! We also indicated that the additional skill that a language designer must learn is the skill of writing spelling and grammatical rules of language and testing these rules. We note that it is very difficult (and impossible) that someone can design a programming language and they are not completely fluent in any programming language! So long as the target group of programming language design is the category of programmers, how can one imagine that someone can compose a programming language and does not know anything about programming?!