5 ms·
When working with data, I like to avoid stateful data mutations at all cost. OOP's focus is mutating state. These are at odds. The identity semantics I hold for
by aaron-santos 5y ago
When working with data, I like to avoid stateful data mutations at all cost. OOP's focus is mutating state. These are at odds. The identity semantics I hold for data are not invariant under transformation.
- lostmsu 5y agoWhat does OOP have to do with mutating vs non-mutating state?
- mjburgess 5y agoobject = state object API = state change encapsulation = internal control of state change That's the point.
- lostmsu 5y agoHere's an object with over 30 members: https://docs.microsoft.com/en-us/dotnet/api/system.uri?view=net-5.0 https://docs.microsoft.com/en-us/dotnet/api/system.uri?view=... Your second and third statements are simply false.
- aaron-santos 5y agoUnderstanding the history of OOPs development, what motivated it, what problems it seeks to solve, it's guiding principles, and design semantics, are not invalidated by copy on modify Uri classes (or Strings!).
- lostmsu 5y agoNo, but it is enough to invalidate statements, that are obviously false in the light of the counterexample. Also, lacking skills in first order logic casts doubt on any kind of "understanding".
- aaron-santos 5y agoOk. What do you think the history of OOP development, it's focus, and goals with respect to mutating (or non-mutation) of state is?
- lostmsu 5y agoAs I mentioned in the comment to mjburgess, it does not matter, unless you can show it does. Fortunately, knowing the details of history is entirely optional for the ability to discuss the current state of affairs.
- aaron-santos 5y agoIt might help if you could restate what argument you think I'm making. It feels like there is a mismatch between us in that way.
- lostmsu 5y ago> OOP's focus is mutating state. But please, do not assume I haven't read your arguments.
- aaron-santos 5y agoNo, just validating my assumptions. What sort of evidence would change your mind? Accounts from language designers? Expert testimony? Reference material? Interviews?
- lostmsu 5y agoAccounts from language designers or reference material would work.
- mjburgess 5y agoYou are extraordinarily ignorant of the history and design of programming languages to be making such statements. `object = state` is not a paraphrasing of first order logic; it is a paraphrasing of the english sentence, "The intention motivating OOP is that the object represents state; the object's API represents changes to its state; an encapsulation ensures those changes are privately managed." which if you understood any of the context to this discussion, you would have captured -- see, eg., the other commenter who captured this accurately. I have taught hundreds of hours on programming language theory, and it is what I am doing today; and it is something I have been doing for a decade (not least, programming for two decades). I take this tone with you because assuming a person cannot /reason/ basically is an extraordinarily arrogant view which presumes you have precisely captured the context of their statements. In cases of apparent "basic failures to reason appropriately" it is almost always the observer, not the speaker, who has failed to arrive at the correct "propositional model" of their spoken/written language. You would do well to remember this, and include more humility in your communications.