racket-reloadable
racket-reloadable copied to clipboard
The unique-ness of make-persistent-state
(Suggestion from @jeapostrophe) I think that you don't want to try to enforce this too much because you don't want to prevent people from moving the state to a different module. Maybe you could detect within one load cycle whether the same name is used twice.
I've been thinking a little about how to do upgrades where a piece of state needs fixups on module reload. I think moving state between modules might end up being a special case of that: you'd detect the state in the old location during the upgrade, move it to the new location in the new module, and delete the old location. (There's no API for removing a piece of persistent state yet, of course.)