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

Add derive macros #89

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sufflope
Copy link

Hello,

here is my take on #43 😃 I worked on AbsDiffEq first, it's still a draft obviously.

@Sufflope Sufflope force-pushed the 43_automatically_deriving_implementations branch 3 times, most recently from c2531d6 to a6611c0 Compare September 26, 2024 14:11
@Sufflope
Copy link
Author

I added RelativeEq support, they mutualize nicely so UlpsEq should be pretty straightforward. I also added support for generics, but TBH I don't really know where to go from there, I miss examples of real use-cases I guess. Should I add a "shortcut" to specify one generic type to use as the backing type, something like

#[derive(AbsDiffEq)]
#[approx(generic = T)]
struct Foo<T> {
  value: T,
  ...
}

or keep it like I did and allow to not necessarily reuse T's characteristics, but be more verbose if you do?

@jonaspleyer
Copy link

For anyone looking out for this topic: It seems that development of this crate is stalled. I have written my own lib approx-derive to solve the problem of non-existing derive macros.

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