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

std interface reform (#1829): simple #2553

Closed
wants to merge 36 commits into from
Closed

std interface reform (#1829): simple #2553

wants to merge 36 commits into from

Conversation

tgschultz
Copy link
Contributor

A much simpler pattern than #2533. It has but two advantages over the current pattern:

  • It will optimize better
  • Interfaces can be copied

assert(seek.impl != null);
const aligned = @alignCast(@alignOf(T), seek.impl);
return @ptrCast(*T, aligned);
}

This comment was marked as resolved.

@andrewrk
Copy link
Member

Please see #130 (comment). I'm closing this pull request because it's not really mergable, but I do consider it to be an invaluable tool in evaluating how to proceed with that issue, once the time comes to do that. 👍 Thank you @tgschultz! (I'm going to copy this comment to the other 2 pull requests, for the benefit of anyone stumbling upon them.)

@andrewrk andrewrk closed this Aug 16, 2019
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.

3 participants