Regardless of immutability, saying "this" imply a bound between the data and the function, which is the very thing Elm wants to avoid.
So I think the systemic problem referred to here is "separation of data and logic", and its incarnation (sort of) is the ability to say "this". Now, is it actually a systemic problem ? My intuition is that it is the root of many difficulties OO languages can have, even though it does not seem like a problem at first. Le 20/07/2017 à 09:55, Dave Ford a écrit : > There is a line from the docs that I am trying to understand: "Elm > encourages a strict separation of data and logic, and the ability to > say |this| is primarily used to break this separation. This is a > systemic problem in Object Oriented languages that Elm is purposely > avoiding." > > What is the systemic problem being reference? Is it the [lack of] > "separation of data and logic" or "the ability to say this"? > > I have been programming in Java (an OO language) for a long time. I can > name dozens of systemic problems in the language. But the ability to say > "this" is not one of them. Nor is it the commingling of data and logic. > > Please help me to understand what the author is talking about. > > Thanks. > > Side note: "this" /is/ a problem in JavaScript. But not in OO generally. > > -- > You received this message because you are subscribed to the Google > Groups "Elm Discuss" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout. -- Christophe de Vienne -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
