We teach users to pass state values into operations.
But state references can go stale (an issue made worse by global state, which I think should be removed, see #17) or not be assigned yet because they are read synchronously.
For example:
get('/some-data')
post('some-data', state.data)
This code will fail because the value of state.data is read synchronously, because the get was completed.
It should be written with some kind of lazy state evaluation, like this:
The compiler should be able to detect references to state (literally that global variable reference) and raise a warning when it is used in a naive chain like this.
We teach users to pass state values into operations.
But state references can go stale (an issue made worse by global state, which I think should be removed, see #17) or not be assigned yet because they are read synchronously.
For example:
This code will fail because the value of state.data is read synchronously, because the get was completed.
It should be written with some kind of lazy state evaluation, like this:
The compiler should be able to detect references to
state
(literally that global variable reference) and raise a warning when it is used in a naive chain like this.