3 ms·
Interesting. Can you expand on how this is similar to/different from a functional approach? i.e. using types & values to define and hold data respectively, an
by spinningslate 4y ago
Interesting. Can you expand on how this is similar to/different from a functional approach? i.e. using types & values to define and hold data respectively, and functions to define the logic/transformations that apply among types.
- codethief 4y agoTo me this sounds very much like functional programming as well despite the fact that in OP's link it is said that > Distinguish data-oriented programming from functional and OO programming I mean, if code & data are separate and there is no state, there's no other option left in the code separation vs. stateless/stateful (<> mutations) 2×2 matrix other than functional programming. The 2×2=4 options are: procedural (data and code separate, mutations allowed), object-oriented (data and code not separate, mutations allowed), functional (data and code separate, no mutations/state), and a fourth option (data and code not separate (i.e. still classes), but no mutations/state) which Gary Bernhardt jokingly calls FauxO, see minutes 10:21-13:31 of his talk about Boundaries: https://www.destroyallsoftware.com/talks/boundaries https://www.destroyallsoftware.com/talks/boundaries
- spinningslate 4y ago> To me this sounds very much like functional programming as well despite the fact that in OP's link it is said that >> Distinguish data-oriented programming from functional and OO programming Yes, that was the basis of my question. The book description also states: > In DOP, you maintain application data in persistent generic data structures separated from the program’s code. You use general-purpose functions to manipulate the data without mutating it. Which seems a lot like functional programming. The use of 'persistent' is perhaps interesting, though there's nothing inherent in FP that excludes persistence obviously.