Sean W. Hammond’s Post

It finally "clicked" - what Object-Oriented Programming (OOP) actually means. This is pivotal for Python and even JavaScript with React. You might even say it's a "key" concept, a very "value"-able part of the language. And when you "pare" it down to basics, you are left with objects. Anyway, I already knew about and used objects, and learned about “object-oriented programming” several times, but for some reason did not connect the two concepts. But yes, object oriented programming (OOP) is called such because it is a language that includes the variable type of objects. It boils down to that. For some reason, I once mistakenly thought of the objects in object-oriented programming as different from the variable type objects, like perhaps something visual, like an “object” moving around the page during a game for example. For example, the ball in Pong having different values to describe it - an X and Y position. Now, that's not too far off. But objects can represent so much more than that example. Yes, you can use an object to represent something on a page, but an object is basically a variable with one or more key-value pairs inside, each key-value pair basically being another variable inside that object. Later, I assumed the object vs. functional programming distinction meant that OOP did not frequently use loops and if statements. But JavaScript disproves that. Of course, I might still be misunderstanding something, so anyone can comment to add further clarifications. #OOP #ObjectOrientedProgramming #Python #JavaScript #Programming #Programmer #Coding

  • No alternative text description for this image

OOP was one of the first major programming paradigms I was introduced to in High-school when I started learning to program. To me after a decade of OOP programming, I would say a programming object is a container of information, with associated attributes or characteristics, that represents something concrete or abstract. A person as a programming "object" could have attributes like name, age, weight, height, etc. A "dog object" might have breed. A more abstract object could be a financial instrument, with cost, expected return, volatility, etc. An even more abstract object could be a container, like a linked list or a hierarchical tree with values and pointers to neighbours as its key attributes. There is a lot of power in using objects as data structures and classes as scaffoldings to build libraries and ecosystems. If you can describe a system as a set of objects with characterists that interact *based* on these characteristics, then you can probably program a model of that system in OOP. Thanks, Adrian.

Like
Reply

You might find this talk by Anjana Vakil interesting: https://m.youtube.com/watch?v=TbP2B1ijWr8&pp=ygURamF2YXNjcmlwdCBhbmphbmE%3D It was a really insightful video for me. The big idea of object oriented programming ironically isn't objects; it's message passing and late binding (I'm still a little fuzzy on the late binding part but the message passing makes sense).

Like
Reply
See more comments

To view or add a comment, sign in

Explore content categories