Programming Languages

Ask a question
A programming language is a language designed to describe a set of consecutive actions to be executed by a computer. A programming language is, therefore, a practical way for us humans to give instructions to a computer.

Languages that computers use to communicate with each other have nothing to do with programming languages. They are referred to as communication protocols, and it is quite different from the former. A programming language is very strict, wherein each instruction corresponds to one processor action.

The language used by the processor is called machine code. The code that reaches the processor consists of a series of 0s and 1s known as (binary data). Machine code is, therefore, difficult for humans to understand, which is why intermediary languages, which can be understood by humans, have been developed. The code written in this type of language is transformed into machine code so that the processor can process it.

The assembler was the first programming language ever used. This is very similar to machine code but can be understood by developers. Nonetheless, it is so similar to machine code that it strictly depends on the type of processor used (each processor type may have its own machine code).


Thus, a program developed for one machine may not be portable to another type of machine. The term portability describes the ability to use a software program on different types of machines. A software program written in assembler code may sometimes have to be completely rewritten to work on another type of computer.

A programming language is, therefore, much more understandable than machine code and allows greater portability.


Imperative and Functional Programming Languages

Programming languages are generally divided into two major groups according to how their commands are processed: imperative languages and functional languages.

Imperative programming language

An imperative language programs using a series of commands, grouped into blocks and comprised of conditional statements that allow the program to return to a block of commands if the condition is met. These were the first programming languages in use and, even today, many modern languages still use this principle.

Structured imperative languages suffer, however, from lack of flexibility due to the sequentiality of instructions.

Functional Programming Language

A functional programming language (often called procedural language) is a language that creates programs using functions, returning to a new output state and receiving as input the result of other functions. When a function invokes itself, we refer to this as recursion.

Interpretation and Compilation

Programming languages may be roughly divided into two categories: interpreted languages and compiled languages.

Interpreted Language

A programming language is, by definition, different from machine code. This must, therefore, be translated so that the processor can understand the code. A program written in an interpreted language requires an extra program (the interpreter), which translates the program's commands as needed.

Compiled Language

A program written in a compiled language is translated by an additional program
called a compiler, which creates a new stand-alone file that does not require any other program to execute itself. Such a file is called an executable.

A program written in a compiled language has the advantage of not requiring an additional program to run it once it has been compiled. Furthermore, as the translation only needs to be done once, at compilation it executes much faster.

However, it is not as flexible as a program written in an interpreted language, as each modification of the source file means that the program must be recompiled for the changes to take effect.

On the other hand, a compiled program has the advantage of guaranteeing the security of the source code. In effect, interpreted language, being a directly legible language, means that anyone can find out the secrets of a program and, thus, copy or even modify the program. There is, therefore, a risk of copyright violation. On the other hand, certain secure applications need code confidentiality to avoid illegal copying (e.g. of bank transactions, on-line payments, secure communications, etc.).

Intermediary Languages

Some languages belong to both categories (i.e. LISP, Java, Python, etc.) as programs written in these languages may undergo an intermediary compilation phase into a file written in a language different from the source file and non-executable (requiring an interpreter). Java applets, small programs often loaded in web pages, are compiled files that can only be executed from within a web browser — these are files with the .class
extension.

Some Examples of Widely Used Languages

Here is a non-exhaustive list of current programming languages:


LanguageMain application areaCompiled/interpreted
ADAReal-timeCompiled language
BASICProgramming for educational purposesInterpreted language
CSystem programmingCompiled language
C++System object programmingCompiled language
CobolManagementCompiled language
FortranCalculationCompiled language
JavaInternet oriented programmingIntermediary language
MATLABMathematical calculationsInterpreted language
MathematicaMathematical calculationsInterpreted language
LISPArtificial intelligenceIntermediary language
PascalEducationCompiled language
PHPDynamic website developmentInterpreted language
PrologArtificial intelligenceInterpreted language
PerlProcessing character stringsInterpreted language


Image: © Signs and Symbols - Shutterstock.com

Latest update on June 19, 2018 at 06:40 PM by owilson.

This document, titled "," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (https://ccm.net/).

Lenguajes de programación
Lenguajes de programación
Programmiersprachen
Programmiersprachen
Les langages informatiques
Les langages informatiques
I linguaggi di programmazione
I linguaggi di programmazione
As linguagens de programação
As linguagens de programação
Programmeertalen
Programmeertalen
Язык программирования
Язык программирования