Answer the question
In order to leave comments, you need to log in
OOP in C# from Alan Kay's point of view?
It is often said that modern OOP is not OOP as the founding fathers intended it to be. I looked at the basic principles of OOP from the point of view of Alan Kay and I can not understand what he wanted. I will give specific examples:
1) Everything is an object
Nu. In C#, everything seems to be the same. Even if you execute: , then you can then call the method , although it seems to be just a number.
2) Calculations are carried out by interaction (data exchange) between objects, in which one object requires another object to perform some action. Objects communicate by sending and receiving messages. The message is a request to perform an action, complete with a set of arguments that may be needed when performing the
Yes action. This is not.int a= 1
ToString()
3) Each object has an independent memory, which consists of other objects
. I don’t understand what it is about at all
4) Each object is a representative of a class that expresses the general properties of objects (such as integers or lists)
It is. If you create two objects of a class, then the same methods will be available to them.
5) The behavior (functionality) of the object is specified in the class. Thus, all objects that are instances of the same class can perform the same
Stop actions. Isn't that what I wrote in point 4?
6)The classes are organized into a single tree structure with a common root, called the inheritance hierarchy. The memory and behavior associated with instances of a particular class are automatically available to any class lower in the hierarchical tree
. This is generally insane. If I have a Dog class that describes a dog, what mythical single generic class should it inherit from?
Sorry for the blurry text
Answer the question
In order to leave comments, you need to log in
I looked at the basic principles of OOP from the point of view of Alan Kay and I can not understand what he wanted.
About the sixth point. In C#, all classes inherit from System.Object by default. And your Dog class inherits from it by default.
It seems to me that it is simply pointless to breed holivars about whether the current OOP is true or not, because:
1. The current type of OOP is working.
2. The OOP that the "founding fathers" conceived was nothing more than a sketch, a sketch. Then this sketch was polished for many more years.
3. The principles of OOP have changed for a reason (if they have changed at all): it means it was necessary, it means they found a more profitable / adequate solution.
As for c#. It was originally conceived as an OOP language, and coding in it without this knowledge is, to put it mildly, difficult. It contains all three basic principles of OOP, and these principles just summarize all the points that were proposed above. Yes, and c# has a corny main parent class called Object, it (c#) is simply built on classes from the ground up. Therefore, argue, do not argue anyway, we will come to one result: what we have is what we use.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question