Design Shared State - Glow-Lang/glow GitHub Wiki
How best to represent state that is shared between many interactions?
Some interactions require shared state between many sub-interactions. This shared state will be represented by its own UTXO on Cardano or Nervos, and/or its own (set of) contract cell(s) on Ethereum or Tezos.
How do we express shared state in the language?
- The imperative way, as in Solidity, is possible, but it's also what we're trying to avoid and improve upon.
- We want a pure linear approach that matches the UTXO model. We like that in Nervos they distinguish between inputs, that are consumed and "dependencies" (or deps), that aren't; see also mutable vs immutable references in Rust.