History of simplification in programming languages
Faster, more reliable planning as application domains evolve requires changing programming languages.
The C language was designed to write the operating system, so to use the hardware directly. This is why types such as int or string pointer correspond to the memory structure.
C wants to break down operations at the expense of the work imposed on the programmer and is actually intended for critical software, where writing work is nothing compared to the difficulties of processing and its optimization.
This is ideal for implementing the programs for which it was designed. Where everything goes wrong, it is when the creators of new languages dedicated to C, and who make a compiler in C, consider themselves obliged to resume the syntax of this system language, even if the applications of this new language have nothing to do with the system and do not require this kind of syntax. This is the case of C++, an application language designed as a system language, as well as those who succeeded it, like Java and C #.
There has always been resistance from programmers to simplifying languages, their working tool to which they are attached. John von Neumann, the inventor of computers, when presented with Fortran (1954), received the following reaction:
«Why would you want more than machine language?»
(Why do we need something other than machine language ?)
When assembler appeared, less than 1% of programmers wanted to use it over machine language, it was considered a toy for a girl. (Source: Links to "The Future of Programming")
Therefore, innovations must be imposed in order to write the simplest code, to do the most with the smallest number of lines. Fortunately, the creators were able to adopt new languages and took the opportunity to simplify the syntax and overall functioning. Let's see what simplifications could be found in the list, which is certainly not exhaustive .
Object Universalization
In Smoltalka (1970), everything is a subject. The same goes for The Rock. This allows you to inherit the attributes and methods of everything and therefore shorten declarations.
The object principle developed for Smalltalk was not well understood in other languages and especially C++. This is not to say that they really simplify programs. But they help reuse the code and this is progress. The rock has done better, as we shall see.
Loops, not knots
Python (1991) popularized for in with paintings, which is inherited from Gap (1986), as well as "rows" inherited from the Icon language (1970).
You can scan a picture or collection that is a category of objects.
for i in x ...
In general, Python syntax facilitates programming, as well as reading a program - an aspect whose importance was neglected in C++ (always a question about a toy for a girl).
Even more versatile objects
In JavaScript (1995), the function is also an object. In addition, the syntax is the same as for an associative table. It differs from Smalltalk, in addition to the dynamic side, that you repeat the classic elements of procedural languages, such as a function, array, object, in order to make it a single being of the language. Thus, the function can contain other functions, and you can scan the attributes of the object...
Unified Processing and Data
PHP (1995) brought somewhat more inconvenient than advantageous simplifications. For example, an array uses numeric indexes as keys, and this is a source of confusion .
But in the problem of unifying processing and data, he took a step. Thus, PHP code fits into the document, it is mixed with data, but also generates the contents of the same document. JavaScript does the same, but dynamically.
Universal switch
In Script (2001), you can make a switch with any operator and all data types.
switch x < 10 : ... = 15 : ... else ...
The syntax of the while loop includes an increment, so you don't risk getting into an endless loop. Something similar is implemented in older languages.
x = 0 while x < 10 ... let x + 1
Even simpler classes
Scala (2004) declares a class and its constructor with the same header. Scala is fixated on writing code that is five times more compact than Java for the same virtual machine, and this is true due to its simplicity.
You can do a pattern match with classes, which further expands the suite... field.
A more subtle simplification is the ability to create an exchange system in Scala by identifying players and the messages they respond to. This makes it easier to create programs at a more general level.
Simplified competition
Go (2009) runs competing tasks such as simple features. This makes it easier to create web applications in which competition is important, and easier than JavaScript and event programming.
And then?
New languages were able to become popular due to the simplifications they were able to integrate. There's no reason to dwell on it.
A few ideas to further improve languages...
- We have to be able to soar. Properties of objects, their methods... This will facilitate the use of 3D printers and generalize the principle of iteration .
- The unification of processing and data is only very partial in PHP and JS. We need to be able to manipulate treatments like data.
- Application security also needs his party of simplifications...
If you have other ideas, feel free to give them in the comments....
See also:
- History and evolution of programming languages. More details about the contribution of each language, including what concerns the older one.
- Programming paradigms. The search for new programming methods is as old as the computers themselves. The most successful (in speed of execution) have proven themselves, but this is not the only and not necessarily the most productive.