Re:Inheritance Often Doesn't Make Sense
by kaoD on Saturday March 17, 2018 @08:46AM
(#16606718)
"Everything changes and nothing remains still; you cannot step twice into the same stream"
[ Parent
| on HN ]
Re:Inheritance Often Doesn't Make Sense
by kerkeslager on Saturday March 17, 2018 @10:39AM
(#16607127)
Ironically, 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).
Re:Inheritance Often Doesn't Make Sense
by your-nanny on Sunday March 18, 2018 @07:56AM
(#16611543)
Meh. 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.