My observations of the development of programming languages leave a strange sense of stalemate. Recently, a lot of new languages have appeared. But there is no progress in this area. It seems that the development in this area is marking time. By possibilities, languages differ little from each other. Obvious opposition can be seen on the field of typing variables.
Go
On the one hand, these are hard-typed languages such as C, C ++, Pascal, Fortran, Java, on the other hand, JavaScript and its clones. In JavaScript, supporters and opponents of typing wage an open war. New JavaScript standards enhance typing in this language. Strong typing by theorists from programming is considered a great blessing. Languages with weak typing did not appear by chance and this is not a flaw in the creators of the language, but a necessity. It is easier to write in languages with weak typing. But I am not behind the JavaScript declaration of variables and their typing as a current in my great distress. In my opinion, the declaration of variables was generated by the needs of the first translators. And then, as usual, theorists turned into a fetish for which everyone now prays. A striking example of the problems generated by typing is the Pascal library, C, C ++ where functionally identical programs are created for different types of variables. Declaring variables is generally not necessary. For the domain, the integer or real value is not the variable. What value the user entered from the keyboard is this. The task of the program is to manipulate such values without delving into how they are stored in memory. This should be managed by the translator.
Another problem in typical programming languages is memory management. Here, languages with manual memory management such as C, C ++, Pascal, Fortran are confronted with memory management languages using garbage collectors such as Java.
There are intermediate variants such as Object C. The disadvantages of all these methods are well known. No other way of managing memory is traditional programming languages.
When designing an information system to display relationships, data must be stored in complex structures. Such structures are made for languages and are usually in libraries. These are lists, maps, hash tables. Using all this arsenal is inconvenient.
Why am I writing all this? To understand the imperfection of the world order? Not at all. There simply exists a programming language that does not have all these disadvantages. It seems to be there, and it does not seem to exist. He lives on his own the rest of the world on his own. He is known to a narrow circle of writing programmers. The creators of languages do not see it in the support. They create languages ala Algol collecting all his problems and then heroically overcoming them. And very proud of it. And it does not occur to anyone to simply not create problems so that in the future they cannot be overcome. Maybe I'm talking about some little-known home-made? Not at all. This is a long-known language born at the turn of the 60-70s. Unlike many others, it was immediately standardized. The standard for this language becomes the third after Fortran and Cobol. In 1995, the standard for this language was updated. And the major media producers in this language almost adhere to this standard. It remains to call this language. I think most of the name will not say anything, but his name is MUMPS.
Let's see how he copes with the above problems.
Declaring and, as a consequence, typing in this language is absent as such. Variables exist always in 3 persons. Every variable always has a numeric, logical and string value. The interpretation of the variable that is necessary for this operation is used. The variable occurs immediately in 3 persons at the time of its recording. This is either the location of the variable to the left of the equal sign or when reading it from external devices. To destroy variables there is a special command. A variable has not only a value but also a structure. Any variable is a logical tree. Lists and hash tables are easily displayed on such a structure. The language has another unique feature. The variable can be in permanent memory and therefore the need for files is very limited. This ability of a language to locate hierarchical data in files is widely used and this language is often interpreted as a database. Although this property of the language is not basic.
The language has many unique properties missing in other languages. The language has full support for databases. This data is on permanent storage, transaction support and logging. The language supports distributed data. Your data may be located anywhere in the world, but for you it will be just a standard hierarchical tree. Multitasking is built into the language with the creation of independent threads of execution and synchronization. The language has its own built-in input / output including asynchronous.
Memory management is very elegant. The programmer does not control the allocation of memory at all; it works only with logical variables, and where they are located he does not even have the opportunity to learn. Yes, and the location of data in memory is not defined, it may at different times be in different places. Data in memory and on external media is stored as a B-tree and, by definition, does not need garbage collection.
With all its virtues, it is a very compact language. In terms of standard, this is an easily translatable language. The programs on it are very compact, easily debugged and incredibly reliable. Thanks to the full automatic data management errors in runtime exception.
Personally, this language gives me a purely aesthetic pleasure. When I have to program in traditional languages after MUMPS, I feel as if weights were tied to my legs and forced to run. Although it is possible to run with weights.
But in this world, things are not so simple. The last standard of this language was developed in 1995 and it did not make fundamental changes to the previous standard. And by now this language is somewhat archaic. I decided to develop a new language based on the ideology of MUMPS that would take into account the current state of languages. But about the shortcomings of MUMPS and about the language I propose next time if it comes to that.
It came: MSH article
habrahabr.ru/post/241369