Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] Allow State Output pin on Process #49

Open
gregsn opened this issue Dec 3, 2021 · 0 comments
Open

[Proposal] Allow State Output pin on Process #49

gregsn opened this issue Dec 3, 2021 · 0 comments
Labels

Comments

@gregsn
Copy link
Member

gregsn commented Dec 3, 2021

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?

Related to quest #48

@gregsn gregsn added the proposal label Dec 3, 2021
@gregsn gregsn changed the title Allow State Output pin on Process [Proposal] Allow State Output pin on Process Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant