3 ms·
When I first encountered Object Orient Programming around '97 or so, all of the literature focused on the three pillars of OO: encapsulation, inheritance and po
by commandlinefan 3y ago
When I first encountered Object Orient Programming around '97 or so, all of the literature focused on the three pillars of OO: encapsulation, inheritance and polymorphism. I was struck at the time at how OO mostly just formalized and gave specific names to what good programmers were already doing informally.
- rightbyte 3y agoThe words are also confusing and too much latin. Encapsulation - Hidden Inheritance - Same fields in beginning Polymorphism - Tagged struct
- slavapestov 3y ago“Hidden” from whom and how? “Same fields in beginning” doesn’t characterize multiple inheritance. “Tagged structs” are just one implementation strategy for one kind of polymorphism, and “tagged” and “struct” are themselves jargon. Using and knowing the precise terminology is important when communicating technical concepts.
- jcelerier 3y ago> I was struck at the time at how OO mostly just formalized and gave specific names to what good programmers were already doing informally. I mean, that's the point of everything, isn't it? giving names and defining good practices so that everyone can benefit from them? because even today you can find a LOT of codebases which are an imperative mess
- wvenable 3y agoA lot of comments/articles complaining about Object Oriented Programming -- especially the style implemented by C++ and similar languages -- start with premise that OOP is some academic prescription declared from up high like Moses and 10 Commandments. But the reality is that the best practices of imperative programming where already much like object oriented programming and that OOP is a formalization of those practices.
- pjmlp 3y agoIndeed, I see many of the concepts as extensible modules, as one would use from Modula-2 or Object Pascal. That is why Oberon takes the spartan approach of only having extensible types, everything else is just like in Modula-2. Later descendants adopted a more mainstream approach. Likewise how OOP is done in Ada or Modula-3 isn't quite like in mainstream approach. Or when modules can be manipulated like variables, and given type signatures, we get Standard ML functors, with overlapping capabilities to OOP.
- User23 3y agoStrongly agree. Good C developers pretty much instinctively do structured programming[1]. While it's superficially dated, the core concepts are still all very much applicable to the working programmer today and even largely paradigm independent. [1] https://dl.acm.org/doi/book/10.5555/1243380 https://dl.acm.org/doi/book/10.5555/1243380 (lousy interface, but PDF download available)