Repository navigation
Replies: 1 comment 6 replies
|
I'm quite against adding metadata to order edges. We should instead use value edges. I suggest we:
|
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We want to distinguish order edges that are there for different reasons - otherwise we have to assume every edge might be there for every reason, which results in a kind of cross product. (Not too painful while there aren't many order edges but we're gonna see a lot more...)
I see a couple of options:
I'm gonna concentrate on (2.) here and try to solve some of the problems of the current Order edges. Besides that we can't identify what any Order edge is for, another problem is that nodes can arbitrarily discard Order (have Order inputs and no outputs) or produce it (outputs and no inputs) - ops do not specify their Order inputs or outputs. This would be one advantage of switching from Order to linear Value tokens, but for many of the ordering constraints that we want in practice, linear is too restrictive (as it requires a total order of ops). Rather the ideal would be - as a new EdgeKind variant, so showing existing variants for comparison:
That is, whereas classical Values can be copied and discarded (but linear cannot), the new EdgeKind supports copying and merging (aka joining), but not discarding. (Better names invited!)
We would then allow Extensions to define "types" for these edges (maybe
OrderTypes ?) - these could be a lot likeExtensionTypes (but not FunctionTypes or SumTypes so they are notTypes), so we could add a new variant ofTypeDefBoundallowing such to be created by an extension TypeDef (including parametrized - so an extension could define an arbitrarily large family of OrderTypes - ideal for, say, uses of different global variables).All reactions