3 ms·
"Everything changes and nothing remains still; you cannot step twice into the same stream"
by 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.