Skip to content
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

Remove Opaque/UnwrapOpaque #823

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ethanresnick
Copy link
Contributor

@ethanresnick ethanresnick commented Mar 2, 2024

This PR may be premature, so I'm happy to let it sit for a bit. But, the basic idea is that:

  • Now that tag metadata has landed, Tagged types are strictly more powerful than Opaque ones, thanks to their ability to more naturally support multiple tags.
  • Opaque has always been misnamed (since the underlying, untagged type isn't hidden at all, which is a critical property of opaque types in other languages).
  • So it feels like we're at/approaching a point where Opaque and UnwrapOpaque should be removed.

@ethanresnick ethanresnick force-pushed the remove-opaque branch 18 times, most recently from dbbf3f9 to 570a494 Compare March 4, 2024 21:42
source/opaque.d.ts Outdated Show resolved Hide resolved
@voxpelli
Copy link
Collaborator

voxpelli commented Apr 3, 2024

We can do a @deprecated first, that will help notify people that it will go away and ease people's upgrade path?

@ethanresnick
Copy link
Contributor Author

@nplusp @voxpelli Ok, I've renamed the files from opaque -> tagged and opened #867 to mark these tags as deprecated before removing them.

@ethanresnick ethanresnick force-pushed the remove-opaque branch 3 times, most recently from 6741610 to 9ba360b Compare April 19, 2024 01:32
@KinderGouello
Copy link

Can you also update the README section "Alternative type names" where Branded redirects to Opaque instead of Tagged?

@ethanresnick
Copy link
Contributor Author

@KinderGouello Done, here and in #867.

@ethanresnick ethanresnick force-pushed the remove-opaque branch 2 times, most recently from f871c1c to 07fbd83 Compare April 29, 2024 07:48
@ethanresnick ethanresnick changed the base branch from main to revert-787-fix/601 April 29, 2024 07:49
@ethanresnick ethanresnick changed the base branch from revert-787-fix/601 to main April 29, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants