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

Combining HRTBs with associated types #5

Merged
merged 1 commit into from
Sep 28, 2018

Conversation

alecmocatta
Copy link
Contributor

I'm working on data-parallelism library, heavily inspired by Rayon but focused on describing certain computations on a dataset in an SQL-like manner, somewhat akin to Diesel.

One part of this combines HRTBs with associated types. I've bumped into a few issues that have made things a bit tricky (#30472, #30867, #53943, and similar), the hardest to work around however has been that I don't believe it's currently possible to write this:

type Task = for<'a> <B as Abc<&'a A::Item>>::Task;

Currently I've resorted to a dummy trait, manually reimplemented on various structs without the reference, such that I can do:

type Task = <B as AbcDummy<A::Item>>::Task;

and (horribly) transmute between the two.

I'd be very interested to discuss

  1. issues I've bumped into combining HRTBs and associated types;
  2. how to get rid of this transmute and the dummy trait;
  3. any feedback on the library before I publish and promote it, given it's heavily inspired by your work on Rayon!

I can do any of the Monday or Friday times listed, though I have a preference for the 16 - 16.30 slots.

Again, much appreciation for you doing this, I think it's awesome!

@nikomatsakis
Copy link
Owner

Hmm, this doesn't sound like a beginner topic to me, and the two Friday slots I laid out are already taken. Let me take a look, maybe I'll add another slot.

The library sounds awesome!

The limitations around HRTB can be pretty annoying and there aren't always good workarounds. This is one of the things I hope to fix in the Chalk work.

@alecmocatta
Copy link
Contributor Author

Thanks! No problem, I thought I might as well express interest, and I can update if any other slots or 2018/10.md come into existence.

From what I've seen I'm really excited about Chalk, looking forward to seeing it progress!

@nikomatsakis
Copy link
Owner

@alecmocatta october slots now available :)

@alecmocatta
Copy link
Contributor Author

@nikomatsakis Thanks!

@nikomatsakis nikomatsakis merged commit 597496d into nikomatsakis:master Sep 28, 2018
@alecmocatta alecmocatta deleted the patch-1 branch September 28, 2018 14:56
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.

2 participants