Currently, we don't offer a state output, because we don't know if the type is immutable or not. Let's define more clearly what process patch means: take that notion from the containing type (where the process node gets used).
This means that some instances of the process are immutable and others are not.
Currently, the type system only knows flat-immutable types and mutable types.
Other possible notions would be:
deep immutable
unable to say. Different per instance.
If we'd add this second option, we'd be able to output a type with that notion.
We'd be able to call operations on that process node.
Compiler internals:
Review: are there corner cases where we'd run into issues? Is the target code where we work with those process nodes straightforward? The intuition is that the operations of that type get compiled in a way that they internally work with the __WITH__ operation, which outputs a new instance depending on whether the instance is immutable or not. So all good right?
Well. Currently, types have a boolean flag telling whether they are immutable or not. Can we, for now, get away by just marking the type of a Process patch to be mutable? Or do we need to actually rework all of that?
Currently, we don't offer a state output, because we don't know if the type is immutable or not. Let's define more clearly what process patch means: take that notion from the containing type (where the process node gets used). This means that some instances of the process are immutable and others are not.
Currently, the type system only knows flat-immutable types and mutable types.
Other possible notions would be:
If we'd add this second option, we'd be able to output a type with that notion. We'd be able to call operations on that process node.
Compiler internals:
Review: are there corner cases where we'd run into issues? Is the target code where we work with those process nodes straightforward? The intuition is that the operations of that type get compiled in a way that they internally work with the
__WITH__
operation, which outputs a new instance depending on whether the instance is immutable or not. So all good right?Well. Currently, types have a boolean flag telling whether they are immutable or not. Can we, for now, get away by just marking the type of a
Process
patch to be mutable? Or do we need to actually rework all of that?Related to quest #48