4 ms·
I prefer to adopt Daniel Dennett's model of 'useful fictions' when trying to talk about what the world 'is'. The question for developers isn't if the world is i
by Barrin92 7y ago
I prefer to adopt Daniel Dennett's model of 'useful fictions' when trying to talk about what the world 'is'. The question for developers isn't if the world is immutable or mutable, it's if mutability or immutability are useful concepts.
To ask if the world is mutable is like asking if money is real or if the colour red is real. Does it make more sense to talk about RGB values or colours? The only reasonable answer is 'it depends'.
It depends on what aspect or properties one is interested in and what lens is best suited to solve problems or which one personally finds most insightful. The world can be modelled as an immutable sequence of state transitions or as a place full of stateful objects, there isn't any clear answer and programmers shouldn't be too literal about what they perceive the problem to look like but rather think about what toolbox is most useful.
- xchaotic 7y agoI agree with that and therefore think immutable is not a useful abstraction as it does not approximate how things appear to be in what we perceive as real.
- Barrin92 7y agoThere are many domains where immutability makes intuitive sense. Accounting and bookkeeping for example, which is a huge domain within software development. A Git history is essentially a model of the world as a history of immutable states, and what we care about is the transition from one state to the next and its difference, as well as an accurate representation of each past state. But one name or ID is only ever associated with one state. It would be really horrible practise if accountants or version control systems would mutate state and overwrite history. Another domain where immutability is useful for this reason is concurrency, where it avoids a lot of conflict.
- sk5t 7y agoIsn't that just a function of how you choose to perceive? For example, the water in a river, and our skin cells are constantly replacing themselves, even though it might not seem that way--what I mean is, maybe one's epithelium is more like an immutable structure, each time displacing the one that came before. Or consider atoms, which sort of have immutability as a core concept.