News for hackers. Stuff that matters.
Re:Hotcaml: An OCaml interpreter with watching and reloading by munificent on Thursday January 20, 2022 @02:23PM (#30013445)
> which is to have a central data store that then is persisted between changes to the view code that generates a view from that store

You may think of it that way conceptually but the language and VM don't think of it that way. It's all just objects in memory in the heap. Architecturally, there's no real separation between persisted and non-persisted state.

> Does the app crash? Or does it automatically restart with a fresh slate (maybe this falls under the "some kinds of structural changes that necessitate a full restart that wipes state away" you mentioned)? Or is the change ignored?

I'm not an expert on the details, but I think it simply won't do the hot reload if it determines that it can't do so safely. It's up to the user to then choose to do a full restart and wipe the state if they want.

There are no comments on this comment yet.