4 ms·
I would argue (contra Kay) that OOP really isn't about message passing; an object is fundamentally a state machine, not an actor or a fiber. So it should really
by jasonhansel 5y ago
I would argue (contra Kay) that OOP really isn't about message passing; an object is fundamentally a state machine, not an actor or a fiber. So it should really be:
thing_undergoing_state_change
.state_change(params)
- AmpsterMan 5y agoI think you are exactly correct. The success of OOP thinking is actually one of the things I don't like sometimes; we are so focused on creating state machines with carefully crafted interfaces that we forget that we can have stateless functions as part of our state machines. In general, I wish we were more careful with only creating these state machines when the alternative is more complex, or when the problem domain is easily modeled by one.
- amw-zero 5y agoThis is an obligatory comment that you feel this way because of popular languages that have the OOP label that don't have much of any resemblance to what Kay intended as OOP. To understand his vision more, look at Smalltalk. Messages are more than just re-branded procedure calls, they can be inspected and forwarded to other objects (i.e. delegation) for example.