I want to express a radical view on Object oriented programming.
Let me cite Wikipedia's first paragraph on Object oriented programming:
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction, encapsulation, messaging, modularity, polymorphism, and inheritance. Many modern programming languages now support OOP, at least as an option.
|
Let me dissect this paragraph:
Programming techniques may include features such as data abstraction, encapsulation, messaging, modularity, polymorphism, and inheritance.
|
Very well, this is what every programmer should have in mind as valid techniques. These techniques can and should be used, if appropriate, in any programming language, including assembly.
Many modern programming languages now support OOP, at least as an option.
Which programming language *does not* support OOP? Assembly surely allows for clean and beautiful implementation of "data abstraction, encapsulation, messaging, modularity, polymorphism, and inheritance".
***
Here is my radical opinion on OOP: oop is a term made to advertise certain teaching practices, and promote certain, more or less arbitrarily chosen, programming languages and programming features. The main purpose of OOP is to serve, directly or indirectly, the benefit of the teachers.
Those techniques might actually be good as a side effect, but their *primary* goal is to sell the book/programming language of the particular preacher that teaches it.