|
|
|
|
|
by zdragnar
529 days ago
|
|
OOP generally "hides" data as internal state of class instances. Everything is private unless expressed as a method on an object. The two sentences around the one you quoted should answer the question as well: > With Clojure, we modeled the entire collaboration system as a stream of immutable data transformations. Each user action becomes a transaction in our system.
And > When conflicts occur, our system can merge changes intelligently because we're working with pure data structures rather than complex objects.
Whereas OOP languages combine behavior and data into a single thing (classes with methods model behavior and hide state i.e. data) functional languages separate them: functions model behavior, and data is treated more like an input and output rather than "state".In particular with clojure, data structures tend to be immutable and functions tend to not have side effects. This gives rise to the benefits the article talks about, though is not without its own drawbacks. |
|