TimelyDataflow / differential-dataflow

An implementation of differential dataflow using timely dataflow on Rust.
MIT License
2.51k stars 182 forks source link

Remove `KeyOwned` #498

Closed frankmcsherry closed 1 month ago

frankmcsherry commented 1 month ago

This PR removes the KeyOwned associated type, replacing it with generic parameters that GATs must implement IntoOwned into. These requirements are meant to be relaxed to those moments where something owned is needed, and they can potentially be avoided entirely for logic that does not required owned types.

The PR also tidies the Val<'_> GATs to follow the same idiom, where they previously required a function to map to V.

frankmcsherry commented 1 month ago

Thanks! We can discuss the arg further, but yes I think better than we have before, and less ambiguous for values (for which V could be lots of things, because the function could plausibly produce any type). The only risk I see is that we have lost some flexibility (that we could add back) by only producing the Owned types.