It would be good to have multiple code cells similar to Jupyter notebooks so that the user can incrementally run and add code without having to worry about running the same code twice (which can, for example, lead to duplicate widgets).
Once concern that arises from this is how state or scope can be persisted across code cells. Since code will be eventually run in worker threads, and each code cell will be most likely compiled and executed independently, the scopes in each code cell (and on each run of a code cell) will be independent and isolated.
One approach would be to expose some shared scope object onto which the user can add values that they want to be available in all cells, similar to global variables. But I guess I'll give this more thought when I set out to work on this.
It would be good to have multiple code cells similar to Jupyter notebooks so that the user can incrementally run and add code without having to worry about running the same code twice (which can, for example, lead to duplicate widgets).
Once concern that arises from this is how state or scope can be persisted across code cells. Since code will be eventually run in worker threads, and each code cell will be most likely compiled and executed independently, the scopes in each code cell (and on each run of a code cell) will be independent and isolated.
One approach would be to expose some shared scope object onto which the user can add values that they want to be available in all cells, similar to global variables. But I guess I'll give this more thought when I set out to work on this.