| Its hard to know what people mean when they say OOP anymore. Im just watching now and he advocating for your code to be "procedural" rather than "object-oriented". And when he says "procedural", he doesnt specificlly mean "functional programming". So, when he says "imperative procedural programming" he means that you have no explicit association between your datatypes and your functions/behavours. And just to be clear they are not saying its a problem to see an object in your code!! Its the traditional OOO (Object Oriented Objects) that have state and method calls/behaviours. And thats pretty much the way I code in C#. My data objects are just that. Simple data! And I have other objects that are a collection of functions that take in POD (Plain Old Data Types) objects or return PODs. He goes on to explain how encapsulation is the problem. Thats where you have an object that holds state/information hidden behind a public interface
as well as methods to mutate the state. And when you call that method, it might call through to many other methods on other classes. And if thats the case,
it means the object your calling the method on has references to those other classes it depends on. Which means those dependencies/objects
must be provided to it via construction. I have not watched the whole video but I tend to agree with what he is advocating. |