4 ms·
It's not the state that's the problem, it's the state being bundled with the code that operates on the state.
by flukus 6y ago
It's not the state that's the problem, it's the state being bundled with the code that operates on the state.
- pansa2 6y agoWhy shouldn’t they be bundled together? They’re completely interdependent - each is useless without the other.
- hderms 6y agoWell the common FP answer is that data might have many operations on it that are totally orthogonal and that don't depend on shared behavior. I say this as someone who thinks both paradigms have something to offer.
- meheleventyone 6y agoGenerics?
- lmm 6y agoNamespacing them together is good. Hiding the coupling between them isn't. If a function makes use of some data, you want to see where that data comes from, not have the function fetch it via a magic portal to some other part of your code.