# The science of logic in programming

This article is devoted to a comparative analysis of logical entities from the work of the German philosopher Georg Wilhelm Friedrich Hegel's "Science of Logic" with their analogues or their absence in programming.

Entities from the Science of Logic are shown in italics so that there is no confusion with the generally accepted definitions of these words.

# Pure being

If you open the definition of pure being in a book, you will see an interesting line “without further definition”. But for those who have not read or understood, do not rush to blame the author for dementia. Pure being is a basic concept in Hegel’s logic meaning that there is some kind of object, please do not confuse it with the existence of the object, the object may not exist in reality, but if we somehow defined it in our logic, it is. If you think about it, it is really impossible to define such a thing as pure being , and any such attempt will come down to the fact that you will simply refer to its synonyms or antonyms. Pure beingan abstract concept so much that it can be applied to absolutely anything, including itself. In some object-oriented languages, it is possible to represent anything you like as an object, including operations on objects, which in principle gives us such a level of abstraction. However, in programming there is no direct analog of pure being . To verify the existence of an object, we need to verify its absence.

``if(obj != null);``

It is strange that there is no such syntactic sugar, given that this check is very popular.

# Nothing

As you might have guessed, nothing is the absence of anything. And its analogue can be called NULL. It is worth noting that in the science of logic, nothing is pure being , because it also exists. This is a bit of a catch, we can’t refer to NULL as an object in any language, although in essence it is also one.

# Becoming and moments

Becoming is the transition from nothing to being and from being to nothing . This gives us two points , the first is called the appearance , and the second is the passage . Transition is so named instead of extinction, because a logical entity cannot essentially disappear unless we forget it. Withdrawal as such can be called an assignment procedure. In case we initialize the object, the moment of occurrence occurs , and in case of assigning another value or NULL, the moment of transition .

``````obj = new object(); //возникновение
obj = null; //прехождение``````

# Cash being

In short, being is an object that does not have a clear definition, but has certainty . What does it mean. A canonical example is ordinary stool. 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 seating,” but the chair is also created for this, etc. But the lack of a clear definition does not prevent us from highlighting it in space and using it when transmitting information about it, this is because there is certainty of a chair in our head . 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 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.

# The law of transition of quantitative changes to qualitative

This law was formulated by Friedrich Engels as a result of the interpretation of Hegel's logic. However, it can be seen in the first volume in the chapter on measure . Its essence is that quantitative changes in the object can affect its quality . For example, we have an object of ice, with the accumulation of temperature it will turn into liquid water and change its qualities . To implement this behavior, an “State” design template exists in the object. The appearance of such a solution is caused by the absence in programming of such a thing as the basis for the emergence of an object. Base determines the conditions under which an object can occur, 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.