java - What is the difference between golang's structure and object in c++?
仅有的幸福2017-05-16 13:27:31
0
2
850
They feel very similar, and they are similar to the c structure. Do you want to know what the specific differences are? Why not just call it an object, but a structure? Is it because this structure has no concept of class?
Because writing object-oriented programming in go is different from traditional object-oriented programming. For example, go does not have abstract methods. Objects in C++ can have abstract methods.
This article has a more detailed explanation: http://hackthology.com/golang...
Because writing object-oriented programming in go is different from traditional object-oriented programming. For example, go does not have abstract methods. Objects in C++ can have abstract methods.
This article has a more detailed explanation: http://hackthology.com/golang...
It should be class vs structure.
The instantiation of a class is called an object. .
Is there a misunderstanding in the question? .