Skip to content

Optional Support for Multi-Shot Continuations #110

@GunpowderGuy

Description

@GunpowderGuy

This Stack Switching Proposal introduces one-shot continuations, which are efficient and align with a contiguous stack model. However, languages like Scheme, Racket, and other functional or dynamic languages rely on multi-shot continuations (e.g., call/cc), which can be invoked multiple times and require capturing and restoring the stack.

Would it be feasible to optionally support multi-shot continuations in this proposal? This could allow languages that depend on full continuation support to target WebAssembly without losing core features. Even if there’s a performance trade-off (e.g., using a linked-list stack or stack copying), having the option would broaden WebAssembly’s applicability.

Note : Racket supports both one shot and reusable continuations, both delimited. Scheme only supports undelinited reusable continuations, but they can be implemented over delimited ones

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions