Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder how spreadsheets catch recursive formulas so quickly. eg cells that depend on each other.



As far as I know they build up a graph of the cell execution order, so recursive loops are quite easy to find.


Finding cycles in a graph is not that simple though. I'd expect they just keep a few state bits in each cell and when a cell that's marked as being in the process of calculation gets hit again as a dependency you've hit a cycle.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: