News for hackers. Stuff that matters.
Re:How to implement a spreadsheet by qznc on Friday July 24, 2015 @04:35AM (#9940743)
Why the "reads" field? It is just filled and cleared, but never used. This also solves GC issues.
Re:How to implement a spreadsheet by reycharles on Friday July 24, 2015 @04:40AM (#9940759)
It seems "reads" is used in "invalidate" to remove the cell from "observers" in the cells in "reads".
Re:How to implement a spreadsheet by qznc on Friday July 24, 2015 @05:04AM (#9940817)
Yes. I missed that.

Nevertheless, removing the "reads" seems more worthwhile than removing "observers". You want to model the data flow efficiently, not the data dependencies. The dependencies are provided indirectly in the code anyways.

Re:How to implement a spreadsheet by art-w on Friday July 24, 2015 @06:09AM (#9941009)
Even if you manage to remove the explicit "reads" field, the "code" thunk is still going to point to the parent cells, so that wouldn't help the GC much.