6 ms·
> The real world is mutable Only if you ignore time. It's not possible to change the state of the world at some previous instant (as far as our understanding o
by greydius 9y ago
> The real world is mutable
Only if you ignore time. It's not possible to change the state of the world at some previous instant (as far as our understanding of physics is concerned). The mutable world model is an artificial construction that aligns with our human perception.
- kaoD 9y ago"Everything changes and nothing remains still; you cannot step twice into the same stream"
- kerkeslager 9y agoIronically, the latter part of what you quoted shows the solution to representing change in an immutable system: create a different stream object instead of mutating the same stream object. (Streams in this case not being streams in an I/O sense, just an example of a class).
- kaoD 9y agoYes, that's exactly what I meant. Sorry for not being clearer.
- your-nanny 9y agoMeh. Once you mutate an object it is not the same object it once was either; you've only maintained a stable memory reference and alias, without the overhead of making a new one.
- weberc2 9y agoIf you're modeling the world, you can do so immutably. If you're interacting with the world (I.e., I/O), then you cannot.
- seanmcdirmid 9y agoSomething that changes over time is mutable. Time exists and we can’t escape it, even with time-indexed immutable data structures that implement explicit mutability. The only question is does the thing change internally (an object) or is it replaced with a new one (a value).
- kerkeslager 9y agoI think it's not at all evident that reality is not a value replaced with a new one all the time.
- seanmcdirmid 9y agoEven if that were the case, it wouldn’t be useful since we experience time with continuity anyways. Bob at time t is still Bob at t+1 even if his state (like position) has changed. If Bob were a value, then he would be another person, we would have to add a persistent ID to the bob values so we could see them as the same object.
- greydius 9y ago> Bob at time t is still Bob at t+1 I guess we're getting more into philosophical issues now. If I leave an ice cube on my counter, at exactly what time is it no longer an ice cube.
- seanmcdirmid 9y agoMutability is mutability, it also applies to ontology even if most OO languages don’t model dynamic ontology with inheritance (unlike say Self or Cecil). Your ice cube was never just an ice cube in the first place, it was just some water that happened to be frozen as a cube...once heat was applied to the water, it’s state changed so that it eventually could no longer be classified as an ice cube.
- greydius 9y ago> Your ice cube was never just an ice cube in the first place That's my point. This idea that there are objects with mutable state is a myth. Even at the smallest scale, what we call elementary particles, are abstractions. There is nothing except the state of the universe at a given instant in time.
- 9y ago