Computer programming is undoubtedly one of the sectors that have had the greatest impact on the lifestyle of the modern world. Today we all use at least one program or mobile application a day ; Whatsapp, Facebook, Windows, Google Chrome, all are desktop or mobile software that have seen the light thanks to this complex science.
As far as programming is concerned, without a doubt one of the most important elements is programming languages. There are many of them and each one has been developed thinking about promoting the development of a certain type of program , but all software or application is written with one of them.
In this article we will show you everything you need to know about programming languages, those that have allowed the creation of the browser you are using right now to read this article and many other programs and applications more.
Index:
What is a programming language and what is it for in computing ?
A programming language is a formal language that allows a programmer to write codes to create computer programs. These programs contain a source code in which all command lines and algorithms written in code are written , which then goes through a compiler to translate it into machine-like language, the most basic and elementary of all that It is understood by the computer.
Programming languages are unique, and as new advances are made and more powerful techniques are developed for the creation of software, new languages are also being developed to create much more complex applications .
What are the most important elements of a programming language?
A programming language has very well defined characteristics and elements that directly influence its limitations and potential.
Here are the most important elements of any programming language :
Variables
Variables are spaces in the memory of a program that store important data for its operation, such as complex processes or order sequences. These are classified according to the type of data they can store, and in that sense we know the following :
Conditional
These are text strings that, as the name implies, in their code condition certain program functions to be executed only if several factors are met.
In this sense there are three of them; “If”, that imposes the conditions that must be met for the execution of the software; “Else if”, indicates under what conditions the program can be executed if the “If”, is not met, so it is usually preceded one’s; and “Else”, that imposes the conditions for the program or a part of it to run if the previous two are not met, so it is generally preceded by both or at least one of them.
Functions
The functions are variables that contain code of themselves inside, so that it can be used to not always have to rewrite the same function or order throughout the source code of the program. The process of writing a program may require you to mention the same skill repeatedly, which was previously done.
These functional variables are created with the intention of simplifying the process, indicating with a shorter fragment that the program must execute a function that was previously preset in its code.
Syntax
The syntax of a programming language defines the possible combinations of the textual elements of this (numbers, letters and signs), to create a semantically perfect program that works without errors in its code. In most cases, languages are purely textual, but programs with graphic syntax can also be identified, since their nature is more visual than written.
Static semantics
If the syntax is the correct form of expressions, static semantics allows the programmer to identify expressions within a language and know their meaning. This is used to define restrictions on text structures that cannot be expressed with a standard formal expression of the language as such . This can be in two ways; dynamic or operational.
Type system
Now we enter quite complex terrain. A type system is how a language organizes certain values of its structure into “types” , also defining how they interact with each other and the way in which they may or may not be manipulated. Thanks to them it is possible to verify errors and programs badly described in said language, discarding them, although sometimes it could also rule out correct programs.
It is for the latter, that many languages choose to eliminate these “types”, which has allowed them to be known as untyped languages. As for those who do use type systems, we can identify the following :
- Static: Static type languages are those that determine the “type” of all expressions and their value before being executed by the software in question. They can be in two “explicit” ways; when the programmer is the one who must manually write each type, or “inferred”; when the compiler is the one in charge of inferring and determining the values.
- Dynamic: On the other hand there are the dynamic type languages, which determines the validity of a type before its execution, these being related to execution values instead of simple textual expressions. Like inferred static, it is not the programmer who must write them, but the compiler or other language element.
- Strong and weak : Finally there are strong and weak types . The first of these prevents a “type” can be treated like any other, granting specific rules, while the second is completely the opposite of this, and allows more freedom in that regard.
Types of programming language How are all classified?
Programming languages have different ways of classifying themselves, and then we will present the most important classifications with some examples of the most popular languages of each.
According to level
The first classification of programming languages is based on their level of abstraction, or what is the same, depending on how specific and universal they are.
In this sense the following types of programming languages are known :
- Low level : These are languages developed for a hardware and cannot be used outside of it. His intention is to take full advantage of this, with the limitation that it cannot work in any other. Some of the most important in this category are C ++ or Fortran.
- High level : these are completely opposite to the previous ones and can be used in different equipment and hardware architectures. His intention is to be more universal and to be able to use with more freedoms. Some of the most important in this category are Basic or Pascal.
- Medium level : These are programs that are halfway between the low and high level, so They can use various functions of high-level languages, with the potential to focus on a particular system architecture. One of the most popular is C Basic.
By paradigm
The process to develop a program or software life cycle has several paradigms that in turn have allowed the birth of new languages. For this reason, there is also a classification by paradigms in terms of computer programming languages .
In this sense we can identify the following:
- Imperative: The imperative programming is based on the creation of algorithms that contain mechanized instructions for the realization of a software process or function. To imagine these programs, think of a recipe that tells you step by step the procedure to follow, and the ingredients to get the final dish.
- Object-oriented >: Object orientation is based on the imperative paradigm, with the difference that it encompasses each process in “objects”, which are related to each other and contain variables and values of different program functions. The most representative languages of this are C ++, Java and Pyton.
- Dynamic: Dynamic programming is one that seeks to speed up the process for writing a program to the maximum, so They fragment all the processes into mini-processes in which one works individually until the best possible result is achieved. Functional languages such as Haskell are used for this.
- Functional: Functional programs are written according to functions that are activated according to the data input received from the user. That is, they are not fully activated, but only initiate what is necessary to fulfill this function. The most important languages of this are Haskell and Scheme.
- Event-oriented : These are programs in which their execution depends on the conditions given by the system and the user. This is one of the newest paradigms on the list, born in 2013, so that so far it is also being studied further. Some of the languages of this would be Lexico and Visual Basic, as well as the popular Javascript that has always had similar characteristics to this.
- Declarative: Declarative programming consists of indicating and declare to the system what the problem is, without giving logical orders for its solution. In these software, the programmer only indicates the event, and clearly expresses what you want to obtain with your solution, but does not explain how it should be solved, and from that task to the computer itself. Examples: Lisp and Prolog.
- Logic programming : This paradigm describes logical relationships that interact with each other to initiate processes and functions of the program. For her, functional languages such as Prolog are also used.
- Multiparadigma: This is a philosophy that tries to combine multiple paradigms in the writing of the same software. As you have noticed, there are languages, such as functional ones, that can be used to program with other philosophies. Some of the most important in this regard are Pyton, Prolog or Lisp.
For generations
Finally, we have the classification by generations, which is nothing more than a way to locate certain languages at the time they were created. Throughout history there have been five generations of programming languages, and today you will know them all:
- First generation : born on the same day that the machine-like language (binary code) is discovered, which is the only one that computers comprise. At that time that element was discovered, but also the fact that each system had its own architecture that only understood certain languages, which would be known as low-level languages, whose first expressions were Assembler x86 and MULT.
- Second generation : In this era, symbolic or assembly languages are discovered and developed. These are nothing more than low-level languages that are much easier to translate into machine language, which is the only one that understands the computer and therefore is the only way to tell you what to do.
- Third generation : High-level languages are born, which does not mean that they are more powerful than low-level languages, but that they have the ability to operate on multiple systems regardless of their architecture. It is from here when a boom in programming begins, which allowed us to create programs much more versatile than those that were available.
- Fourth generation : the fourth generation corresponds to a series of tools that allow the creation of programs and applications from parts of other programs. However, these are not considered in most cases a language. Therefore, object orientation is considered by many to be the real fourth generation since it was its emergence that really introduced significant changes to the way of programming.
- Fifth generation : Many consider fifth-generation languages used to create artificial intelligence such as Java or Pyton. Born in the 80’s with the Japanese project of the fifth generation whose purpose was to design a new class of computers powered by AI. However, this project was a complete failure, so for current programmers, the so-called « fifth generation »does not exist yet, and they are left alone with the previous four.
List of the most commonly used programming languages
Now you know what the main classifications of programming languages are, it’s time for you to get to know some of the best exponents.
Therefore, below we present the five most used languages today:
Javascript
Although for several years it has been encouraged to stop using javascript on websites, today it continues to be one of the most used languages for the development of computer programs and all types of websites, as well as also video games and even for robotic programming . He is currently one of the greatest exponents of object-oriented programming and his expectations for the next decade are very good.
PHP
This is a program related to the development of mobile applications and web aps for browsers, being commonly combined with HTML, since it was one of the first that could do it working sideways with the server . It was created by Rasmus Lerdorf in 1995, also being one of the greatest exponents of free software development.
Python
For many this is one of the most essential programs to learn to program. Its use for decades that is a common denominator in the sector, so it is a very well structured and studied language. It is used both for program development and for computer security and other tools.
HTML
One of the best known languages in the world. It is something you will have to learn if you are interested in programming websites or online applications. As far as Internet portals are concerned, this is undoubtedly the most used language due to its ease of execution and connection speed between the client and the server .
C ++
This is an object-oriented programming language currently used to develop desktop applications, such as video games, browsers such as Google Chrome or operating systems, being one of the foundations of Microsoft’s Windows >.
What is the most basic and easy to learn programming language? to get started?
Programming languages are not difficult to learn as such. It is a series of formal expressions that if you have a good memory it will be very easy to memorize regardless of its nature. What really needs advanced knowledge is the programming as such, for which you will have to understand the behavior of the computer to develop orders and algorithms that can control it.
That is why the real difficulty of a programming language lies in the type of software you want to develop. For example, with two or three months of dedication it is more than likely that you are able to write a simple web with other basic functions in PHP, but if you propose to develop a mobile application, it will be much harder to do so, and it will take you more time.
Our recommendation is that you start with languages that allow you to make simple applications or basic websites such as HTML, CSS or PHP to write your first strings of code. As for learning time, it depends how much you want to specialize. On average, programming simple questions should not take more than a few months of dedication, but if you really want to be an enlightened program, you will need years to give you enough experience.