Thinking about paths some more (#282), one of the things you often want to do is assert a new reagent for the drop, either waste or something protocol-specific. The most straightforward way to do this is probably something like
except that when the compile sees set reagent = waste, it can't know that what it's going to need is a drop. So what I probably want is a result that can take anything that has a reagent attributethat could takewaste`.
In other words, set A to E evaluates E and returns a lambda that can take anything that has an A that can be set using E's type. To do this right, I will definitely need overloaded functions (#288).
One thing to note here is that I want to get the precedence right so that set expressions can sit within injection chains. That is,
... : set attr to x+1 : ...
should put the addition within the value, but
... : set attr to x : f : ...
should take f as the next injection target. To make it part of the value, you should have to say
... : set attr to (x : f) : ...
Migrated from internal repository. Originally created by @EvanKirshenbaum on Aug 03, 2023 at 11:43 AM PDT.
Thinking about paths some more (#282), one of the things you often want to do is assert a new reagent for the drop, either
waste
or something protocol-specific. The most straightforward way to do this is probably something like(or
to waste
).This would be essentially equivalent to
or possibly better
except that when the compile sees
set reagent = waste
, it can't know that what it's going to need is a drop. So what I probably want is a result that can take anything that has areagent
attributethat could take
waste`.In other words,
set A to E
evaluatesE
and returns a lambda that can take anything that has anA
that can be set usingE
's type. To do this right, I will definitely need overloaded functions (#288).One thing to note here is that I want to get the precedence right so that
set
expressions can sit within injection chains. That is,should put the addition within the value, but
should take
f
as the next injection target. To make it part of the value, you should have to sayMigrated from internal repository. Originally created by @EvanKirshenbaum on Aug 03, 2023 at 11:43 AM PDT.