Object Oriented Programming

Everything eventually compiles to procedural programming. That is the way. It is steps that run on x86 and then procedure calls that add to stack. So C is the right model for programming in law level. Object oriented code is also easy to transform to c like thing. Object dot method tranforms to method with object as argument. Instance variables are just references. We can think of these as structs. It give some convenience over C style I suppose. Don’t need to maintain a lot of references. The references are encapulated. It is the model of thinking that really that makes it special and gives it a name. Objects are high level conceptul thing that live on the heap. One object has references to another or many others. These are really graphs. Their behavior is hidden. Encapsulated. This is now dangerous. We call some method but we don’t know what is going to be executed. Object oriented programming first came about during the GUI revolution. Then all the GUI elements lived as objects. Inheritance and polymorphism are there too. But they are discouraged by the modern patterns. What is famous now is composition only. This is the graph I talked about. The objects in some languages have to be destroyed manually. Some have garbage collectors that destroy them when it no longer has connections.