You are reading a single comment by @gdanov and its replies. Click here to read the full conversation.
  • espruiono's save() and boot process is unlike anything I've ever used. It took me one evening of experimenting to finally grasp how the different pieces fit together. The "saving code..." page has it very well laid out, but I needed some practice to really grok it. This page must be front & central, it's extremely important information. The difference when code is evaluated and when global state is restored is key

    There can be different opinions about save(), mine would be - forget that it exists :-)
    It is magic that makes things simple in simple cases but may bite you later in unexpected ways so I'd go with plain boot script setting up everything at boot time with no save()d state at all. See also http://forum.espruino.com/conversations/329685/

  • Thanks. I've been re-thinking how to structure the code I intend to do (modules included) and am moving in the direction where very little state will be persisted via save(), if any.

About

Avatar for gdanov @gdanov started