MSH Language Interpreter
I offer you
my vision of the ideal language. In my previous articles I have already stated my idea of the ideal language
From MUMPS to MSH Features and differences of the MSH programming language from MUMPS .
The reviews were mostly negative. After reading the reviews, I was surprised to find that everything is very perfect in the world of programming languages. But I am gnawed by vague suspicions that everything is not so good in this world. Of course, there are already a lot of languages, but the diversity of concepts of languages is not observed.
If we discard the minor decorations of languages, then there are several such concepts.
- Object programming.
- Data management, typing.
- Transferring a variable number of parameters to procedures and functions.
- Manage the process of execution.
From the solution of these problems, the properties of one or another programming language are added.
')
Object programming
In my opinion this is an important concept and it must be present in the language. Of course, even if there are no classes and objects in the language, nothing interferes with thinking and writing programs in an object style, but still the presence of such mechanisms allows us to simplify this task.
Data management, typing
I consider this section as the most important in the concept of language. I met many discussions on this topic on Habré. Mainly advocates of static and dynamic typing. Dynamic typing has the advantage of language flexibility, but the disadvantage is supposedly the unreliability of the language and poor adaptability to development environments. In static typing, everything is exactly the opposite. I think the arguments about better reliability of languages with static typing are absurd, it is possible that static typing helps in the development of programming tools, but no more. I am not a supporter of either approach. I consider typing as such the main evil of modern programming languages. Although it is present in the absolute majority of programming languages. A language must fully assume all data management, including sorting out their data types. Which is quite real. A programmer must deal with the logic of the program. If you need to check the data, then typing will not help. They just need to check for content. The presence of typing I can only explain the tradition and inertia of thinking.
Transferring a variable number of parameters to procedures and functions
This is a minor problem, but it is hardly solved in most languages. Although a fine example exists in Assembler. Passing parameters through the stack. You just have to abandon the list of formal parameters, and pass the parameters through any list. Returning a variable number of function values is not at all clear to me why and how this can be used. In any case, it is necessary to return some kind of one entity.
Management of the execution process
I consider this section the same for the concept of language. The control structures of languages are almost the same. Small nuances arise using the goto command. I don’t understand why they are fighting with such a frenzy with such a frenzy. Very handy command, especially if the argument of this command can be calculated. In the implementation of parallel computing, variants of the variant are basically 2. Either they are implemented by means of libraries, or they can be included in the language itself. I am a supporter of the second method.
There is no event handling in languages. Although it is widely used. To build a GUI, to implement event handling, the main loop is started. Such a decision does not shine with elegance. Getting inside such a cycle is still a problem. Normal language should have event handling facilities.
My views are of course subjective, and maybe even wrong. But they are based on my personal experience. Modern OS is a bunch of debugged trash that will never be debugged. Pile of API, various libraries from which errors pour. The number of programming languages exceeded all possible limits. And fundamentally they differ little from each other. And on the number of frameworks generally keep silent. Any even medium system is a multi-layered cake of various, possibly poorly compatible subsystems, which will not be fully debugged. Debugging a simple C program can take months. And all this in my opinion is generated by typing in programming languages.
At the moment there is no language corresponding to my ideas about the correct programming language. Closest to him in my programming language MUMPS, but the implementation of such a language as a programming language does not exist. There are database implementations in which this language is used as a language. The limitations of this approach are obvious, which made me develop a new MSH language and write its implementation as an interpreter. At the moment, not everything that I am going to do is implemented in it. In particular, there is no development environment, but you can get an idea of the language.
The implementation was made for Linux x64 OS.
Anyone interested in my work write to the post office, I will send a distribution kit.Ps.
MSH is not only a typeless language, it is not declarative. It basically has no variable descriptions. In general, a variable has not only a type, but also a structure. Arrays, lists, HASH, stacks and a description is required to describe each of the structures. In MUMPS, there are no such declarations in principle; any variable is a tree. No place for such a tree is reserved. A tree node is created at the moment of writing data to it, and only such nodes exist at which recording was made. There are no restrictions on the type of index. Therefore, comparing MUMPS with PHP, Java Script and other languages is incorrect. MUMPS is a separate world, with its own problems and virtues. To understand it you need to rebuild thinking. Understanding MUMPS after reading the abusive reviews is impossible. We must plunge into it. Read the documentation. Install MUMPS system. Work on it. The fact that they do not understand me here is quite natural. We are talking about different worlds. In the world of MUMPS there are no discussions that we have here, about types, structures. Few of the MUMPSists are interested in how their data is stored at all. Any data in MUMPS always has two representations, a number and a string. And depending on the operation, one or another view is taken. I always know the exact result depending on the operation I applied. MUMPS makes the programmer work in tree terms. Trees can be both on external media: globals (analogue databases), and in memory: locales (analogue variables in programs). Basically, when designing an information system, I work directly with the data on the disk of intermediate local data I have a minimum and they do not cause me any problems. Therefore, in the MUMPS forums you will not find discussions about the types of their localization variables. A typical way of designing this is designing input trees, weekends. And then, as necessary, you write programs for the formation of input and output trees. The data in the MUMPS is primary, and the programs are secondary. With my articles, I aim to introduce as many programmers as possible to this other world of MUMPS. I think this world is more correct. I admire these simple, powerful and elegant language. It gives me pleasure to write on it. To my deep regret, I have little to do this. I want to create a language in which you can write everything without going beyond the limits of this language. To write the server, to write Desktop of the client, to add language to browsers.