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

Exactly. Usually in the most basic enum/int state machine you can just save the step and all related data to save and load.

With a coroutine the data can be made global to be saved, but there's usually no flag to indicate what step we're on. On a load the data can be used but its really hard to get back to the exact step in the coroutine stack without building in a lot of conditional logic, which then voids using it in the first place.



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

Search: