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

Can you detect cycles in general though? At first blush it feels like a halting problem.


You can't detect all possible cycles statically, but you can definitely detect them when they happen at runtime. When calculating a value, track its dynamic dependencies. If it ends up depending on itself, you have a cycle.




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

Search: