Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Two-Stage Plan for GC #72

@RossTate

Description

@RossTate

The GC extension has the tension that a good design will take a long time to develop and a quick design will impose backwards-compatibility constraints we will regret. Thanks to some productive prompting by Adam Klein, I had any idea for how to resolve this tension: explicitly design the MVP so that it can be easily compiled to the long-term solution, and explicitly design the MVP with the expectation that it will be phased out (using this compiler) once the long-term solution is available. Here's a rough sequence of events to illustrate what I mean:

  1. Design of Stage 1 GC extension
  2. Release of Stage 1 with notice that it will become deprecated
  3. Design of Stage 2 GC extension
  4. Implementation of Stage-1-to-Stage-2 compiler
  5. Release of Stage 2 with notice that Stage 1 is now deprecated but with hosts temporarily supporting Stage 1 by using the Stage-1-to-Stage-2 compiler
  6. Update of gc-wasm modules to Stage 2, either by directly compiling source code to Stage 2 (since this will enable far better performance and interop), or by simply using the Stage-1-to-Stage-2 compiler
  7. Remove support of Stage 1 from hosts

This will let us make a quick and dirty MVP without worrying about our decisions having unintended long-term consequences. In fact, I'd say what's already in the current GC proposal has the right ideas but is actually too complicated given this plan - I suspect we'd be able to strip out a bunch of features to get just the essentials for supporting typed GC languages (untyped GC languages will need lower-level features for good performance that the long-term proposal will provide). So I think this strategy would get us an MVP sooner and enable the long-term design to be better.

Questions? Clarifications? Thoughts? (I'm intentionally leaving conjectures about the specifics of the Stage 1 or 2 designs out of the discussion in order to focus on the high-level strategy for now - we can dive into the implications of this strategy on those designs later into the conversation when the appropriate time comes.)

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