A programming language is a system of conventions adopted to carry out a communication – between the programmer and the computer. The languages used to program a computer are extremely similar to natural languages.
They are composed of:
1. words (reserved)
3. sentences and phrases
4. syntactic rules
Just as in order to acquire a foreign language its words must be learned and the rules with which it can be manipulated, so in order to acquire a programming language, the words and signs that compose it together with their handling rules must be studied. According to the method by which the whole communication is designed, languages can be classified in several ways. Below I will list the most important language classes, a description that covers all the existing languages.
A. Low-level versus high-level languages
The “level” of a language is appreciated by the position it occupies on the scale constituted by the language recognized by the microprocessor (machine language) and the natural language of the programmer.
A low level language is very close to the machine, it manipulates with hardware, physical level elements such as: registry, microprocessor, memory location, input/output, port.
A high or very high-level language manipulates with concepts close to the natural language, logical level concepts, such as: data collection, operation names (sort, writeln, open), variables, constants (similar in meaning to those in math).
With the help of a high level language the programmer becomes much easier to understand by the computer. Sometimes a single program line written with such language can equate to hundreds of program lines written in machine language. Therefore, from the point of view of reducing the time to make a program and of the safety in operation, it is preferable to a language of the highest level.
In contrast, as the language has a higher level the execution of the program designed with its help will be slower, than of a program that performs the same operation but is written in the assembly language. Another essential difference between the two types of languages is portability, i.e. the possibility of transferring programs to another type of machine than the one they were built on. From this point of view the assembly language is unportable because it is specific to the microprocessor. Programs made on one type of machine must be completely rewritten for the new type of machine, using a new set of instructions – which usually differ greatly.
Things are different with programs designed with a high-level language because they are detached from the car. Between such a program and a computer, the compiler that solves the transformation of the source file into the executable-file is interposed.
B. Procedural – non-procedural languages
The two types of languages, procedural and non-procedural, differ in the level of organization of a program.
Non-procedural languages are designed to think of a program at the instructional level, while the procedural ones force the programmer to design programs at the block level.
In a procedural language called structured language, the programs are written instruction by instruction, but they are logically organized into blocks, groups of instructions, which perform a well-determined action.
A procedural language offers the possibility of using a high level of program design and leads to coherent and error-protected programs. By contrast, non-procedural languages do not favor the programmer in detaching themselves from the “instructional” level and often lead to programs that are difficult to control – especially in the case of large programs.
Non-procedural languages are still preferred by some users due to the very short time their learning and usage takes.
C. Oriented languages
From the point of view of the applicability of a language, languages can be oriented on a particular problem or designed to solve any type of problem – general or otherwise used languages, not oriented on a problem.
The oriented languages have a high degree of specificity, whereas an unoriented language represents a general framework that allows the user to introduce the concepts and processing desired.
So, the essential difference between the two types of languages is the defined conceptual level. The specialized ones already possess the necessary support and allow the programmer to concentrate on the whole of the problem, while the non-specialized ones let the programmer handle the lower levels of the problem.
D. Concurrent languages
A concurrent language allows the definition of processes, processing, parallel, its execution being branched at a certain time. By contrast, non-competing languages, most languages, have a linear development, being active only one process at a time. Competitive processes necessarily involve a multi-tasking system that can handle multiple “tasks” at a time.