1. Hierarchical semantics.
The need for hierarchical semantics is in principle obvious and is associated not only with the need to introduce new terms and concepts or the desire to have a developing language. A deeper property of a developing language is the ability to operate in terms of already existing terms and concepts, i.e. the ability to create a metalanguage. This property allows to avoid semantic closure of the language.
The presence of a mechanism for introducing new terms and concepts implies, first, the assignment of names to these terms and concepts, and, second, the use of these names to operate on the concepts created. I can hardly tell you something new if I say that this is usually done by a sequence of letters and signs. Those. text.
Constructing a language, usually complain about the lack of signs. I can add to this problem a lack of words. The same word in ordinary language may have a different meaning depending on the context. For example, the word “Chair” may have the meaning of a particular existing chair, or it may indicate a class or an object that does not exist, but it must be, or it may just be a word that you need to write or check for correct spelling. And, finally, the most convincing is expressed in the proverb "how much you don’t say honey in your mouth will not become sweeter." Those. the word “honey” cannot be eaten, but honey can be.
Although the problem of “lack of words” is easily and beautifully solved. Based on the context, as a rule, it is possible to determine exactly what meaning this word has. For example, the word “house” in the phrase “I left the house ...” is clearly an object. And we guess that questions about the properties of this object (the number of floors, windows, porches or material) make sense. However, the use of the same word in the phrase “Every man should build a house ...” has the meaning of class. And to specify the number of floors in this case does not make sense.
It will not be unexpected at all that to the question “what is a house?” We get the correct answer, that it is a noun in both phrases. Here this word is considered, not in the sense that it denotes, but as part of a sentence. Those. the phrase is analyzed and the word “house” performs some role in this phrase.
Well, by itself, the word “house” can be considered as a text. Or rather, the combination of the letters "d", "o" and "m".
Here we will pay attention to the fact that the writing and naming of the objects of their instructions or manipulations with them creates a certain hierarchy that breaks away from the real world and begins to exist separately. Actually, the emergence of certain concepts and their naming is the essence of human development. Therefore, the invention of the word “Chair” for a primitive person was a significant step forward from pointing the object with a finger and a characteristic lowing on the “chair” theme. At the moment of the invention of this word, the characteristic properties common to the class of objects “Chair” were highlighted, and this is a great mental work, which we use easily and do not even notice it. Like words like “Table”, “Bed”. And now, another insight. The word Furniture was invented (a new class with its own properties was synthesized). And this class includes both "Bed" and "Chair" and "Table" and "Wardrobe". And the fact that this is a new class with its own properties (not always explicitly formulated) is evident from the phrase “Nikolai was present at the meeting as furniture”. And it’s clear which of the “Furniture” class properties is meant.
The invention of the word "Differential" played a significant role in the development of mathematics, although its definition was known for hundreds of years as the "ratio of the increment of a function to the increment of an argument." But only a word has been invented! And he lived a separate life.
Here we can return to the primitive person who communicates by pointing to things. So, the task of “inventing” a word denoting an object is not just the assignment of a name to an object and thus forming a “new word” (in such a context, the naming of an object is analogous to numbering). A new word is formed as a word denoting a class of objects, and then with the help of pointers, prepositions, articles or from the context, the object is specified (if necessary). In this light, the indefinite articles of the English language define the classes (a water), and the index - the object (cup of water).
But it's not only that. The frequently used method of proof is that the numeration of words of the alphabet is valid only for the first (and abstract) stage of the creation of a language. If we assume that all objects can be enumerated (numbered, named), then in real language this is not the case. The emergence of new words (and the use of old) is associated with the emergence of a new semantic content that includes the previous level of semantics. Namely, all the objects that could be indicated as a chair instead of an indication (or together with an indication) acquired a new semantic meaning of the “Chair” class. After all, this class contains the classes “Stump”, “The stone on which you can sit”, “Stool”, etc. The next class in the hierarchy is “furniture”. And even higher class "joinery". Of course, there is a direct naming. For example, first names, last names, nicknames and generally proper names, but this does not make the weather by and large.
So, integrating your knowledge with the help of classes, a “new language” is created (you can call it a metalanguage in relation to the old one) allowing you to talk about the terms of the “old language”. And “new words”, of course, can be numbered (even despite the fact that some words have several meanings), only these will be words of a new language. And, I hope, in this new language we are not threatened with the problem of consistency and incompleteness.
It is possible to consider such an approach as the development of Russell's logical types and the continuation of Tarsky's ideas on the semantic concept of truth.
Doubts about the legitimacy of the numbering of phrases of the language cause two more reasons. One of them is convention and relativity, which are one of the rules, at least for Indo-European languages. So the concepts associated with the objectification of the language introduce the concepts of "Inside", "Outside", "Left", etc. lead to the fact that the same phrase can have a different meaning and be true for one and false for another. For example, “The knife is left of the plate” is valid only for the one who sits in front of the plate, but for the one who sits opposite this statement is false.
The same situation is connected with the objectification of time. All phrases related to the relative indication of time can change their meaning. And all together this leads to a complete mess, a vivid example, which led Karl Bühler in the "Theory of Language". I quote “sad, he spent the whole evening there; he received today (vm .: that day) two sad news - he went to Rome; here (vm .: there) he lived for two days - and now he has already returned. ” In order to properly understand this phrase, you must take the correct position in space and time yourself and change it during the phrase.
2. Design of the text.
But to separate the text from the subject of analysis is relatively easy, dividing everything that is written into text constants, signs and proper names while observing the following proposed rules.
1. Text constants are written in italics and black.
2. The use of characters and words as non-italic or non-black textual text constants is done by highlighting text brackets at the beginning and end of a text constant. ""
3. If necessary, use text brackets as a text constant. This character is taken in curly brackets. This rule is completely superfluous if you use opening and closing text brackets.
4. Proper names (objects, classes and types) are written with a capital letter and stand out in color. The belonging of an object to a class can be distinguished by the first three consonants from the name of the class or type. Classes and objects are the same color, but classes are bold. Types and values ​​of the same color, types are highlighted in bold.
5. The names of predicates, functions, procedures, and functors are written with a capital letter and are not highlighted in color (black) with no italics.
6. Names of non-boxed predicates, functions, procedures, and functors may contain a reference to the sign that replaces the given name.
7. Values ​​are written with a small letter in black, not italics.
8. Keywords are underlined.
9. Abbreviations contain more than one capital letter and may refer to the text explaining the abbreviation.
10. Proper names, as well as names of predicates, functions, procedures, and functors, can be duplicated by combining into an array.
11. Abbreviation. Contains more than one capital letter.
12. Designation. It can contain only capital letters, numbers and a connecting line.
Text constants are combined with a space.
')
In formalized languages, and even more so in languages ​​with hierarchical semantics where it is permissible to introduce new terms and concepts, the situation is even sadder. Here we can generally call what we want and how we want, and there is a lack of words. Rather, I would like to have meaningful names, rather than an arbitrary combination of letters. And here the choice is not rich, either to distort the appropriate word by combining it with some other explanations such as Length 1 or Most Long Length, or to learn to distinguish the meaning not only of letters.
The classic solution to this problem is any signs before (or after) the name of a concept or object that determine the semantic (and, consequently, specific) meaning of the name. Or use brackets to clarify the meaning of the text. In addition, various standards are proposed, such as the names of integers, that would begin with the letter I. Or recommendatory rules for naming objects of different classes. For example, the names of the buttons that would begin Btn, and the names of the forms with Frm. Reading and writing a program overloaded with special characters is not easy. It is much easier to select lexemes in color. Actually it is already widely used in modern languages. Keywords, identifiers, constants and more are highlighted in color. It remains only a little, to make the selection of color is not an additional convenience, but a means of defining tokens.
Thus, we can easily define the same token "New" as
New New: New = New New
Here, of course, bust, but quite real.
Suggested colors.
New - Keyword defining object
New - Type
New - Class
New - Text
New - The identifier inherits the color of the class or type. In this case, the type.
New - The comment is highlighted in green.
New - Errors
one - Value
Add - The addition functor
Length- Property
Gray- Gray options
Note that rules 5 and 6 that are written in black and not in italics can be replaced by the corresponding value or sign as a combination of characters. Namely:
The value “eleven” is 11, and the predicate “More” can be replaced with “>”.
In principle, such an approach should not greatly complicate the work of a programmer in editing the program. All text can be written in one font, and the comment is highlighted with the “'” sign, the translator will color the text itself and delete the comment mark. The participation of the programmer will be needed when editing the tokens perceived by the translator is not unambiguously what his attention will be drawn to by the flickering of the token and the hint of acceptable options.
In addition to highlighting the same tokens, tokens can be combined into arrays. This can also be found in some cases. Instead of writing Fun1, Fun2 (which we should not do as the identifier consists only of letters), we can write Fun [1], Fun [2], etc.
3. Appeal to properties in the Lada language.
Here is the usual construction of accessing a class property. Where Ob is an object and Length is a property.
Ob.Length
Ob-understandably, an object identifier, and what is Length? Is this an id? Not. Is it a constant? May be. It depends on how the translator is implemented. But, in fact, it is clear that this is the name of the property. Then why don't we use a text variable or identifier to refer to a property on a common basis? After all, it can greatly expand the capabilities of the language. Yes, and simplifies the logic. The answer is. This is done only because it is more convenient. You can make a hint from the drop-down list. And if you set a text variable, it will look very clumsy. That's about as
Ob. ”Length”
But we forget the possibilities of modern text editors. Many translators highlight lexemes in color. Why not do the same in our case. And you can access the property in three ways, and not violating the general principles and logic. True, in this case, we must have a translator that distinguishes lexemes not only in the text. We assume that we have it. Three ways to access a property.
1. ID. What is not possible in existing languages, and what gives new opportunities.
Dim NamePropperty: String = Length
Ob. NamePropperty
2. Text variable. What does not look very nice, but acceptable, and sometimes it may come in handy. Note that our text constant is italicized.
Ob.Length
3. A constant that is supplied from the drop-down list by the master of the prompt as a ready token and differing in color from possibly the same identifier. Which in itself is also a new opportunity.
Ob.Length