Anonymous asks, with dollars:
More about programming languages!
Well then!
Iâve written before about what I think objects are: state and behavior, which in practice mostly means method calls.
I suspect that the popular impression of what objects are, and also how they should work, comes from whatever C++ and Java happen to do. From that point of view, the whole post above is probably nonsense. If the baseline notion of âobjectâ is a rigid definition woven tightly into the design of two massively popular languages, then it doesnât even make sense to talk about what âobjectâ should mean â it does mean the features of those languages, and cannot possibly mean anything else.
I think thatâs a shame! It piles a lot of baggage onto a fairly simple idea. Polymorphism, for example, has nothing to do with objects â itâs an escape hatch for static type systems. Inheritance isnât the only way to reuse code between objects, but itâs the easiest and fastest one, so itâs what we get. Frankly, itâs much closer to a speed tradeoff than a fundamental part of the concept.
We could do with more experimentation around how objects work, but thatâs impossible in the languages most commonly thought of as object-oriented.
Here, then, is a (very) brief run through the inner workings of objects in four very dynamic languages. I donât think I really appreciated objects until Iâd spent some time with Python, and I hope this can help someone else whet their own appetite.