Remix.run Logo
webstrand 2 hours ago

And to me it's just message passing, no inheritance, and with or without unobservable internal state. So long as you're calling procedures that are determined by the "type" of the object, whether dynamic or statically dispatched, it's OOP.

Personally I'm against the practice of enforced state-hiding. I prefer the convention that state ought not to be depended upon, but if you do want to depend on it (sometimes important for composition or inheritance) you have tests to catch changes in the behavior of that state.

And in practice there's often a state-machine of some kind hidden away inside various object types that you cannot avoid depending on.

Jensson 16 minutes ago | parent [-]

> Personally I'm against the practice of enforced state-hiding

Then you are against message passing paradigms. Message passing paradigm implies you can't just go and set state/create state directly, you need to send a message and then the receiver decides what to do with that message.

Its like saying that you like functional programming with mutable state, mutable state makes it no longer functional programming even if you use functions here and there.