This article is devoted to a comparative analysis of logical entities from the work of the German philosopher Georg Wilhelm Friedrich Hegel "The Sciences of Logic" with their counterparts or their absence in programming.
Entities from the "Science of Logic" are in italics to avoid confusion with the generally accepted definitions of these words.
If you open the definition of pure being in a book, you will see an interesting line "without further definition." But for those who did not read or did not understand, do not rush to blame the author for dementia. Pure being is a basic concept in Hegel’s logic, meaning that some object is there, please do not confuse it with the existence of an object, the object may not exist in reality, but if we have somehow defined it in our logic. If you think about it, then it’s really impossible to define such a thing as pure being , and any such attempt will be reduced to the fact that you will simply refer to its synonyms or antonyms. Pure being is so much an abstract concept that it can be applied absolutely to anything, including itself. In some object-oriented languages, it is possible to represent anything as an object, including operations on objects, which in principle gives us such a level of abstraction. However, in programming there is no direct analogue of pure being . To check the existence of an object, we need to check its absence.
if(obj != null);
It is strange that such syntactic sugar is not yet, given that this check is very popular.
As one could guess, nothing is the absence of anything. And its analogue can be called NULL. It should be noted that in science, logic, nothing is pure being , because it also exists. This is a certain hitch, we cannot refer to NULL as an object in any language, although in fact it is also one.
Becoming is the transition from nothing to being and from being to nothing . This gives us two things ; the first is called occurrence , and the second is passing away . Exception is so named instead of extinction, because the logical entity as a matter of fact cannot disappear only if we have not forgotten it. Removing as such can be called an assignment procedure. If the object is initialized in us, the moment of occurrence occurs , and in the case of assigning another value or NULL, the moment of passing .
obj = new object(); // obj = null; //
In short, present being is an object that is not clearly defined, but is definitive. What does it mean. A canonical example is an ordinary chair. If you try to give it a clear definition, you will encounter many difficulties. For example, you say: "this is a piece of furniture designed for sitting", but the chair is also created for this, etc. But the lack of a clear definition does not prevent us from allocating it in space and using it when transmitting information about it, this is because in our head there is a certainty of the chair. Perhaps some have already guessed that neural networks were created to isolate such objects from the data stream. A neural network can be designated as a function defining this certainty , but the types of objects that would include clear and fuzzy definitions do not exist, therefore such objects cannot be used at the same level of abstraction.
This law was formulated by Friedrich Engels as a result of the interpretation of Hegel's logic. However, it can be quite spotted in the first volume in the chapter on measure . Its essence lies in the fact that quantitative changes in the object may affect its quality . For example, we have an object ice, with the accumulation of temperature, it will turn into liquid water and change its qualities . To implement this behavior in the object there is a design pattern "Status". The emergence of such a solution is caused by the absence in programming of such a thing as the basis for the emergence of an object. The basis determines the conditions under which the object may arise, and in the algorithm we decide at what point we need to initialize the object.
PS: If this information is interesting, I will review other entities from the "Science of Logic".
Source: https://habr.com/ru/post/448948/
All Articles