stack-switching icon indicating copy to clipboard operation
stack-switching copied to clipboard

Implementation characteristics of cont.bind (cf. func.bind)

Open conrad-watt opened this issue 5 months ago • 10 comments

When we previously discussed func.bind, my memory is that we ended up with a soft idea that this could be accomplished with a future separate "closure" type that has space in its representation for bound function arguments. Some of the talking points from this previous discussion also seem to also apply to cont.bind:

  • It seems harder to support an unboxed "fat" representation for continuations in the presence of cont.bind
  • Each resume requires an additional conditional check to work out whether any bound arguments exist, penalising resume on "unbound" continuations

Have these points been discussed previously, and has a separate (or subtyped) "continuation closure" type been considered analogous to the "closure" type we considered for func.bind?

conrad-watt avatar Sep 07 '24 02:09 conrad-watt