Attributes of programming languages and their progress
Progress has been made in enriching languages and increasing productivity. This is a list of all the features that can be used for the language.
The first implementation in the language is indicated in parentheses .
Variables
Type inference
The variable type is determined from the value assigned to it. This frees the programmer from explicitly indicating the type of thin economy in fact. (ML 1973).
Animate a line
Variables are inserted into a string that is replaced by their value at run time. For example, in PHP:
$a = 5; $str="$a items";
What will show: 5 items.
Genericity/parametric polymorphism
The ability to replace a type defined as an integer or string with an undefined type as a function parameter in order to apply the same processing to different types of data without having to rewrite the code.
Subtype (subtype)
Hierarchy in language types, as a result of which an operation on a type can be performed on a subtype, and not on different types. For example, an integer would be a subtype of a number and have the same operations as a string type. (Simula 67).
Default assignment
Assign the content of the variable if it is not zero, otherwise assign the replacement value specified by the operator?? (C #)
var x = y ?? 0
Starvation
Hoyting: consists in moving at the beginning of the same visibility space, the area, everything that is declared inside. Variables declared in the function body will be represented by the interpreter at the beginning of the function. You can call a certain function after, because they are all declared by the interpreter at the beginning of the script (but the definition is analyzed in its location in the code). JavaScript uses hoisting.
Functions
Anonymous or lambda
A function can be set anonymously if it is assigned to a variable or passed as an argument to another function. (Lisp 1958).
Fencing
You want to declare an element within another element and assign it as a return value. When included in another function, it has access to its variables, which allows you to read and edit variables declared within the function from a more global scope.
To use a guard, the return value of the container function is assigned to a variable, and that variable is treated as a function. JavaScript uses a fence as a constructor for objects with parameters. (Scheme 1975).
Contract (programming by)
Ensure that the methods and objects meet certain conditions. In the case of the function, preconditions on the arguments and postconditions on the return value are set. They are mandatory in the language that establishes the concept, but they can be added in any language. (Eiffel, 1986).
Example:
put(message : STRING) is require not message.empty -- la chaîne ne doit pas être vide do ... instructions... ensure ... -- conditions sur le message pour accepter le retour end
Monad
A function that can be chained because its arguments are the results of other functions and the return value is used as an argument for other functions.
Named parameter
Calls a function with the argument name and the value assigned to it. An example of a function with the arguments int x and int y:
point(x : 10, y: 20)
This allows you to set parameters in any order and omit them if they are optional. (IDL 1977).
First - class
Overall quality, but rare for functions: the ability to use them as variables. Thus, a phoniton can be passed as an argument or return value... see closing.
Staged (deleted)
Remote programming is the definition of functions performed when the necessary data is available and depending on the type of data. It can be carried out partially in stages. It was described in a paper by William L. Sherlis in 1986 and implemented in "Julia and Other Languages ."
The compiler performs some kind of programming on an internship, since the method of performing subsequent actions is determined depending on the data (source codes) given to the program .
Train
The function can simultaneously return several values that form a tuple. Thus, a tuple containing several variables can be assigned to the result of the function.
Iterations
Generator
The yield keyword in the function returns a value, as does the return statement, but in a loop that can thus return multiple values sequentially. The next value is read each time the function is called, which causes the next value to be evaluated. Function processing is suspended when the word yield is detected, the value is returned and resumed by the next call. (CLU 1975).
Iterator
An object with the table or collection content scanning methods specified as a parameter. (CLU 1975).
List in understanding
Repeat the contents of the list one statement at a time, which filters it and creates another list. This example in Julia multiplies the array elements by two. You can replace x * 2 with a selection condition .
y = [ x * 2 for x in 1:50]
(SETL 1967).
Objects
Aspect
An aspect is a set of questions, and a concern is a group of instructions that interacts with program objects. You can replace one aspect with another to apply the program to a different domain or processing type. (2001 extension of Java Hyper/J by IBM).
Inheritance
Inheritance adds to a class the attributes and methods of the class it inherits. (Simula 67).
Interface
A class containing declared but undefined methods. When a class inherits an interface, it must define each of its methods.
Message or event
Objects can interact by calling their respective methods as in C++, or they can do so as in Smalltak or Objective-C by sending messages to each other. Each object has headphones waiting for messages.
Languages such as JavaScript also support this interaction mode. (Smoltalk 1970).
Mixin/line
A class with access to methods of other classes. Almost with added interfaces whose methods have definition and attributes. Methods can be added at run time. (Flavor, 1986)
The trait is a mixin without an attribute.
Prototype model
Invented in Smalltalk (1970) and in its own way taken by JavaScript, it consists in dynamically creating objects and replacing the legacy with cloning. The advantage of the class model is the ability of the program itself to create and edit objects.
Syntax
Operator overload/ad hoc polymorphism
The statements are redefined in the program to perform different operations depending on the objects they associate. (ALGOL 68).
Regular expression
A sequence of characters representing a search command, and possibly a substitution in the text according to grammar. (Inventor Stephen Wedge in 1956, AWK language in 1977).
Extensibility
Some languages, such as TCL, allow new constructs to be added to the language itself.
Customized Macro
A construct with parameters associated with a definition that will replace the construct when compiled.
Triple operator
Wording: if x = = y then a1 else a2 can be replaced by:
x == y ? a1 : a2
Slides
Simplified syntax for reading or replacing a row of items in a table. ALGOL 68 already writes [x: y] to indicate the interval between x and y in the list of elements .
Process
Purpose
A goal is defined that is an assignment or function call that runs when the process returns the desired result. So instead of writing if it's an action, we write an action if it's a condition.
This structure makes sense if the condition is the result of repeated processing until it can achieve the goal. (Planner, 1969).
Competition
The ability to carry out parallel processing, possibly with interaction between them. (Described by Dijkstra in 1965).
Coercion
Instead of defining processing steps, each of which depends on the execution of the previous one, the properties of the element are determined, when all properties have the required value, the action is performed. (Prologue III 1989).
Sorutina
A block of commands (routine, function), the processing of which is interrupted or resumed depending on external commands. While the function interacts with the return statement. (Simula 67).
Distributed
The ability of the program to rotate modules or objects on different computers. This goes beyond competition that runs on a single computer.
Exception
Exception management is the ability of a language to intercept errors that can interrupt a program and redirect the thread to an instruction block that allows it to continue. (Lisp 1958).
Logic
In logical programming, actions are estimates, and the flow is directed to resolve expressions. This is a case of Prologue, and this has been added as an extension to other languages.
The first language of logical conclusions is Prologue (1972 ).
Pattern match
Encounters a number of possible conditions and performs the action associated with the corresponding condition. (SNOBOL 1962 ).
Promised
Also called possible, future, deferred, awais, promise is an object that can be used when its fields are actually filled in and its attributes matter. When this happens, it becomes active and is considered in current treatment. Implemented in many languages, including C++ 11, JavaScript, Scala, Visual Basic 11, C # 5.
In the example, a JavaScript + HTML promise can be created using a user action, and an asynchronous response when the necessary values are received from the server.
The concept, originally introduced by several authors in 1976-1977, was first implemented in Act 1 (1981) and MultiLisp (1985).
Reactive (programming)
Variables are not statically assigned, but dynamically assigned: their contents depend on the contents of other variables and are updated as the contents of these other variables change. This is how spreadsheets work, where the contents of a cell depend on the contents of other cells. Let's replace the spreadsheet with a database table, and you can describe the processing in several lines of code.
Reflection
The ability of the program to analyze its own code and improve it based on the results. This involves building a program in the form of a subordinate tree .
List
Collector's garage
A memory allocation manager that periodically retrieves free space to remove fragmentation and provide access to more space. (Lisp 1960 +).
Persistence
The state of objects and possibly variables is automatically saved when the program is interrupted and restored when it is overwritten. (MATHLAB 1964).
RII (Resource Acquisition Initialization)
Automatic memory management introduced with C++, where locations are automatically released when objects in use are deleted. (C++ 1984).
Indicators
Lazy assessment
Evaluation of the argument or expression as a whole is delayed until the result is needed for further processing. This can significantly speed up treatment. (Described in 1976).
Multitasking
Compiles a function with generic arguments in multiple versions, one for each argument type.
Portability
Portability occurs through an intermediate language (the first was UNCOL in 1958) running on a virtual machine implemented on each system.
AOT (Ahead of Time)
A virtual machine that compiles program code into native code on first execution and reuses native code during subsequent sessions.
JIT (Jast-In-Time)
A virtual machine that compiles source code or a portion of source code in its native language during each session before executing native code. (Lisp, 1958).
In fact, it can be seen that most of the attributes of modern programming languages have existed for decades.
See also...
Programming paradigms.
The future of programming languages.