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 @:generic from Promise. #1846

Open
wants to merge 1 commit into
base: 9.0.0-dev
Choose a base branch
from

Conversation

player-03
Copy link
Contributor

This was first added in 3dad6d8, without explanation. I think it's time to remove it.

Considerations:

  • In theory, @:generic may make the code faster. However, this isn't performance-critical code, and any improvements are likely to be vanishingly small.
  • @:generic increases the size of the output.
  • @:generic prevents casting to Promise<Dynamic>, which forced a slightly more verbose implementation of FutureWork. Technically this enforces type safety, but usually we don't worry about that sort of thing. If a user's going to use Dynamic, they accept responsibility for the risks.
  • If we remove the tag, we'll be able to add static utility functions.

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.

1 participant