Programming Language #1


A programming language is a language designed to describe the set of consecutive actions that a team must execute. Therefore, a programming language is a practical way for human beings to give instructions to a team.
On the other hand, the term "natural language" defines a means of communication shared by a group of people (for example: English or French).
The languages ​​that the teams use to communicate with each other have nothing to do with the programming languages; they are known as communication protocols. It is about two totally different concepts. A programming language is very strict:
EACH instruction corresponds ONE processor action.

Characteristics of languages
Compiled:
In a compiled language the source code before being executed is converted to machine language (C, C ++) although it can also be converted to intermediate representation that is later interpreted and converted to JIT machine language (Java, C #). The compiler can detect a large number of errors that in an interpreted language or dynamic typing would be discovered at runtime.
Interpreted:
In an interpreted language the source code is compiled to machine code at the time of its execution (Python, Ruby, PHP, JavaScript).
Oriented to objects:
Part of the success of object-oriented languages ​​is due to concepts such as inheritance which is a way to reuse the code of the class from which it is inherited, the polymorphism with which the same method can be implemented in a different way depending on the class that implements it in the hierarchy of classes built with the inheritance, the overload using the same method with different parameters and also the same or more important the encapsulation with which the internal details of the operation of the class are hidden, being only possible to manage the class through the interface (methods) that it offers.
Static typing:
In a static typing language type checks are performed at compile time (C, C ++, Java). The types can be declared explicitly or inferred according to the analysis of the source code performed by the compiler.
Static versus Dynamic typing
Dynamic typing:
By contrast, dynamic typing checks the types at the time of program execution (PHP, Python, Groovy, JavaScript). These languages ​​are known as dynamic languages.
The Inconvenient Truth About Dynamic vs. Static Typing
Strongly and weakly typed
In a strongly typed language a data with one type can not be used as if it were from another. Although some languages ​​such as Java are said to be strongly typed, they have some laxities. For example, in Java a float can be used as if it were a double and in other languages ​​with less degree of typing as PHP a string can be used as a numerical data.
Languages ​​strongly, weakly, statically and dynamically typed
Other features that are often mentioned when talking about programming languages.
Type inference
Based on the analysis of the source code, the type of variables can be inferred, preventing the programmer from explicitly declaring them continuously.
Closures and Lambdas
A closure is a reference to a function that can reference the variables of the context in which it is defined. A lambda is simply a reference to an anonymous function. In Java, lambdas can reference variables declared as final, that is, they are constants.
Defaults methods and Traits
A trait defines a collection of methods possibly including their implementation, in addition, they can define properties. Java defaults methods can define implementations in some interface methods. Wikipedia.
High Order Functions
Higher order functions are functions that take one or more functions as arguments or return another function as a result.

Currying
Curriculum is to transform a function with at least two arguments into a function with at least one argument less.
Typing Duck
This concept is used in dynamic typing languages, treating variables not by their type or inheritance, but based on the properties and methods they support (Python, PHP, Groovy, JavaScript). Wikipedia.
Intersection types and Union types
Ceylon has a more advanced (and complex) type system than Java, an expression is assignable to an intersection types X & Y if that expression is assignable to X and Y individually. An expression is assignable to a union type X | And if it is assignable to X or Y.
Union, intersection, and enumerated types

Named arguments
When we invoke a method with arguments, the arguments are assigned to the parameters of the function according to the order in which they are declared. The named arguments allow you to assign the arguments to the parameters of the function by their names. Wikipedia.
Destructuring assignment
The unstructured assignment allows extracting data from arrays and objects using a replication syntax of the construction of arrays and literals of objects. MDN.
Tuples
The tuples are a data structure formed by several types, in Java 8 the vavr library can be used that adds this and other interesting functionalities. In some languages ​​it can be combined with unstructured allocation. Ceylon Tuples.

Language
Imperative language:
They are a type of programming language that has the characteristic is that it is based on procedures, that is, giving instructions to do something, its characteristic is the use of commands and variables, started in the 50's.
Functional language:
It is based on the declaration of arithmetic functions, it tries to be an expressive and mathematically elegant language.
Logical language:
Study the use of logic for the approach of problems and control over the rules of inference to reach the automatic solution It is that type of programming that allows the software to "reason", that is, to make reasoning, for example, deductive type or inductive.
Object-oriented language:
They treat programs as sets of objects that help each other to perform actions. Understanding as an object the entities that contain data. Allowing programs to be easier to write, maintain and reuse.

Programming environment
A programming environment is a program or set of programs that encompass all the tasks necessary for the development of a program or application. These tasks are basically the following: Editing the program. Compilation and linking.
In programming language we must bear in mind these descriptions of languages:
Syntax: is the set of rules that regulate and coordinate the different variables and their association.
Semantics: is considered an application of logical mathematics. Semantics reflects the meaning of programs or functions.
Programmatic: is the process by which the source code of a computer program is written, tested and maintained.
Grammar: is a finite set of rules that describe the entire sequence of symbols belonging to a specific language.

BNF Notation
Backus-Naur Form notation: is a metalanguage used to express context-free grammars: that is, a formal way of describing formal languages.
The BNF is widely used as notation for the grammars of computer programming languages, command systems and communication protocols, as well as a notation for representing parts of the grammars of natural language.

Syntactic diagrams
It is a graphic representation of the syntax. It has the advantage of being more intuitive. It represents a graphic alternative for Backus-Naur Form (BNF).

Language processor
Are all programs that through a written input in a programming language can manipulate software tools and hardware of a computer.
Interpreter [does not generate additional code]: it is a program that simultaneously analyzes and executes a program written in source language. The first phase of analysis is the same as the compiler.
• It is easier to implement.
• It is not necessary to have all the source code in memory.
Pure interpreter: the process is through the analysis of each sentence and its execution until the end of the entire source program.
• Designed for machines with memory limitations.
• If an error occurs at any time, it must be executed from the beginning.
Advanced interpreter: They incorporate a previous step of analysis of the entire source program.
• They subsequently generate a language executed by the parser.
• They use more advanced languages ​​and allow code optimization.
Incremental interpreter: Directed to languages ​​that can not be compiled.
• You can create objects and functions at runtime.
• The static parts are compiled.
Interpreter Applications:
Command interpreters: taking the source language and running on the operating system (C-SHELL, KORN-SHELL, JCL).
Programming environments: languages ​​with special characteristics and whose compilation is not effective. [Python, Ruby, Perl].
Compiler: compilers are programs that receive a source language and transform it into an object program, which can be assembler or machine code.
Types of Compilers:
Crossed compilers: generate code for a system other than the one they are running.
Optimizing compilers: they make changes in the code to improve their efficiency, but maintaining the functionality of the original program.
Single pass compilers: generate the machine code from a single reading of the source code.
Multi-pass compilers: they need to read the source code several times before they can produce the machine code.
JIT compilers: they are part of an interpreter and compile parts of the code as needed.

Virtual machines
It is a software implementation of a physical machine, either a server or a PC. It is a perfectly isolated software container that can run its own operating systems and applications as if it were a physical computer. Creates a virtual environment between the operating system and the hardware so that the end user can run applications on an abstract machine. To put it more simply, a virtual machine is an application that simulates the operation of a real machine on which you can install operating systems, applications, browse safely, print from any application, use USB devices, etc. The virtual machine behaves exactly like a physical computer and contains its own virtual CPU, memory, hard disk and network interface card. A virtual machine consists exclusively of software and does not contain any kind of hardware component.
Types of virtual machines:
Virtual machines of hardware also called virtual machines of system: they are applications that try to emulate the hardware directly. Calls to the hardware of the installed operating system will be captured and converted into calls to the emulated hardware system. In general, hardware emulation is called virtualization. By emulating the hardware directly, the user has the impression that the machine he is working on is completely independent. These virtual machines allow the underlying physical machine to multiply itself among several virtual machines, each one running its own operating system. The software layer that allows virtualization is called the virtual machine monitor or hypervisor. A virtual machine monitor can be executed either directly on the hardware or on an operating system ("host operating system").
Virtual machines of software also called like virtual machines of process: this type of virtual machines situate above the operating system and try to isolate to the applications of the surroundings on which they execute. The machine starts automatically when the process that you want to execute is launched and stops when it finishes. Its goal is to provide an execution environment independent of the hardware platform and the operating system, which hides the details of the underlying platform and allows a program to always run in the same way on any platform. The virtual machine of Java or the virtual machine of the environment .NET are two clear examples of virtual machines software.

Interpreters
It is a software that receives a program in high level language, analyzes it and executes it. To analyze the complete program, it translates code sentences and executes them if they are correct, thus completing the source program.

Compilers
It is a computer program that translates a program written in a programming language into another programming language.

High level language
It is characterized by expressing the algorithms in a way appropriate to the human cognitive capacity, instead of the capacity with which the machines execute them.
Emergence:
High level languages, also known as evolved languages, emerge after the previous ones, with the following objectives, among others:
Achieve independence of the machine, being able to use the same program in different equipment with the only condition of having a translator or compiler program, which is supplied by the manufacturer, to obtain the executable program in binary language of the machine in question. In addition, you do not need to know the specific hardware of that machine.
Approach natural language, so that the program can be written and read in a simpler way, eliminating many of the possibilities of making mistakes that were given in the machine language, since words (in English) are used instead of strings symbols without any apparent meaning.
Include routines of frequent use such as the input / output, mathematical functions, table management, etc., which are contained in a kind of language library, so that they can be used whenever they want without having to program them each time.
Principal problem:
It can be said that the main problem presented by high-level languages is the large number of them that currently exist in use (FORTRAN, LISP, ALGOL, COBOL, APL, SNOBOL, PROLOG, MODULA2, ALGOL68, PASCAL, SIMULA67, ADA, C ++, LIS, EUCLID, BASIC), in addition to the different versions or dialects that have been developed from some of them.
Fortran: abbreviation of Formula Translator (formula translator), was defined around the year 1955 in the United States by the company IBM. It is the oldest of the high level languages, because before its appearance all programs were written in assembly language or machine language.
It is a language specialized in technical and scientific applications, characterized by its power in mathematical calculations, but being limited in the applications of management, file management, character string processing and report editing.
Throughout its existence have appeared different versions, among which the one made in 1966 by ANSI (American National Standard Institute) in which new rules of the language were defined and the independence of the same with respect to the machine was made, is say, the transportability of language began. This version was called FORTRAN IV or FORTRAN 66. In 1977, a new, more evolved version appeared that was called FORTRAN V or FORTRAN 77, this version is reflected in the document "ANSI X3.9-1978: Programming Language FORTRAN" and defines two levels of the language called FORTRAN 77 complete and FORTRAN 77 basic, the second being a subset of the first. This latest version also includes instructions for the handling of character and file strings, as well as others for the use of structured programming techniques. These characteristics make the language also valid for certain management applications.
Cobol: is the language most used in management applications, created in 1960 by a committee called CODASYL, sponsored by the Department of Defense of the United States, in order to have a universal language for commercial applications as expressed by its name (COmmon Business Oriented Language).
Among its characteristics, it can be cited its resemblance to natural language (English), is self-documented and has great capacity in the handling of files, as well as in the edition of written reports. Among its drawbacks are its rigid rules of writing formats, the need to describe all the elements to the greatest detail, the excessive extension in their sentences and even duplication in some cases, the lack of mathematical functions and, finally, their lack of adaptation to the techniques of structured programming.
Pl / 1: was created at the beginning of the 60s by IBM to be used in its 360 system equipments. The PL / I (Programming Language 1) was developed taking inspiration from the ALGOL, COBOL and FORTRAN languages, taking the best features of the previous ones and adding some new ones, in order to obtain a language as general as possible, useful for technical-scientific, commercial, text processing, database and systems programming applications.
Among its novelties is its great freedom in the writing format of the programs, supporting structured programming and modular design. However, it has not exceeded its parents in its specific application due in part to its size and therefore, the size of its compiler, which until now could only be installed on large computers.
Basic: was designed by professors John G. Kemeny and Thomas E. Kurtz of Dartmouth College in 1965 with the main objective of achieving an easy language to learn for beginners, as indicated in his name Benginner's All-purpose Symbolic Instruction Code ( Symbolic instruction code of general purpose for beginners).
Among its main novelties are those of being an interpreted language and of conversational use, useful for technical and management applications. These characteristics, together with the popularization of microcomputers and personal computers, have made its use enormously widespread, while at the same time it has fostered the emergence of a wide variety of versions that extend and adapt the original language to specific needs. There are many interpreters and language compilers.
Pascal: was created by the Swiss mathematician Niklaus Wirth in 1970, based on the language AL-GOL, in whose design he had participated in the 60s. Its name comes from the seventeenth-century French philosopher and mathematician Blaise Pascal, who invented the first machine of mechanical type to add.
Although in principle the idea of ​​the designer was to provide a suitable language for teaching the concepts and techniques of programming, over time has become a widely used language in all types of applications, possessing great facilities for programming systems and design of graphics.
It contributes the concepts of data type, structured programming and descending design, among others, in addition to having become the predecessor of other more modern languages, such as MODULA-2 and ADA.
C: was created in 1972 by Dennis Ritchie from the work done by his colleague from the Bell Telephone Laboratories, Ken Thompson. They had previously designed the UNIX operating system, and their intention in developing the C language was to achieve an ideal language for system programming that was independent of the machine with which to write their UNIX system.
Although it was initially designed for the programming of systems, later its use has been extended to technical-scientific applications, databases, text processing, etc.
The optimal use of this language is achieved within its natural environment, which is the UNIX operating system. Among its features is the use of structured programming to solve low-level tasks, as well as the extensive library of routines available.
Ada: is the latest attempt to obtain a single language for all types of applications and includes the latest advances in programming techniques. Its design was commissioned by the Department of Defense of the United States to the company Honeywell-Bull after a rigorous selection among several proposals made on a series of language requirements and having negatively evaluated twenty three existing languages. Of these, PASCAL, ALGOL and PL / I were selected as the basis for the creation of the new language. The standardization of language was published in 1983 with the name of ADA in honor of the considered first programmer of history Augusta Ada Byron, countess of Lovelace.
Among the characteristics of the language are the separate compilation, the abstract types of data, concurrent programming, structured programming, freedom of writing formats, etc., presenting as its main drawback its great extension.

Sort:  

I upvoted your post.

Mabuhay, keep steeming.
@Filipino

Posted using https://Steeming.com condenser site.

Congratulations @armandor! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

SteemitBoard supports the SteemFest⁴ Travel Reimbursement Fund.
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.23
TRX 0.22
JST 0.036
BTC 98531.65
ETH 3359.79
USDT 1.00
SBD 3.16