7 ms·
Principles of Data Oriented Programming
- viebel 6y agoThis chapter is an attempt to illustrate what are the core principles of Data Oriented Programming as I understand them. It is highly influenced by my programming experience in Clojure, but I believe that those principles are language agnostic.
- fulafel 6y ago"In pure FP, functions behavior depend only on its arguments, but it is not a requirement for DO (global variables are allowed in DO)." Do you mean global mutable state here, or constants? I think in Haskell and other pure FP languages it's common to declare things globally, but global mutable state is discouraged in many imperative programming cultures too. I guess in the gray area this leaves global state that is initialized once at runtime.
- viebel 6y agoI think that in pure FP, we tend to avoid global variables as much as we can, which is a good practice in general. What I meant is that DO is not opiniated regarding to global variables.
- tome 6y ago> I think that in pure FP, we tend to avoid global variables as much as we can, which is a good practice in general. Hmm, not really. Functions themselves are global variables!
- fulafel 6y agoA compile time immutable name binding is not a variable in the same sense as variables in proceudral programming. Just in the mathematical equation sense.