Skip to content

BREAKING CHANGE: Remove externref in favour of anyref #2327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

MaxGraey
Copy link
Member

@MaxGraey MaxGraey commented Jun 19, 2022

Continue of removing externref which superseded by anyref. See prev part: #2302
Also see spec changes: WebAssembly/gc#271

anyref allowing in reference types proposal now

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@MaxGraey MaxGraey requested a review from dcodeIO June 19, 2022 05:03
@MaxGraey MaxGraey changed the title BREAKING CHANGE: Remove externref in favour to anyref BREAKING CHANGE: Remove externref in favour of anyref Jun 19, 2022
@MaxGraey MaxGraey marked this pull request as draft June 19, 2022 16:11
@dcodeIO
Copy link
Member

dcodeIO commented Jun 22, 2022

There is still some uncertainty around this subject in the spec. Could well be that anyref is removed, or that externref is reintroduced, and I can't really tell from the discussions so far where matters are heading.

If we only want to align with Binaryen, which removed externref, I think we should keep externref around as an alias of anyref, avoiding a breaking change that would differ from the current state of reference types. Then implies that, depending on whether the GC feature is enabled, the consolidated anyref either behaves like the previous externref (in particular assignability), if not enabled, or, if enabled, like the anticipated anyref that can be assigned any *ref. The latter is also still an open question when it comes to funcref, but no decision there yet as well.

So in general I think that we should prefer reference types' current state, and add still in flux GC changes on top if enabled.

@MaxGraey MaxGraey closed this Aug 16, 2022
@MaxGraey MaxGraey deleted the remove-externref branch August 16, 2022 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants