Skip to content

Comment on Maybe Everything Is a Coroutineparent

Comments

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.