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

Derive naming #13

Open
CAD97 opened this issue Nov 10, 2018 · 0 comments
Open

Derive naming #13

CAD97 opened this issue Nov 10, 2018 · 0 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@CAD97
Copy link
Collaborator

CAD97 commented Nov 10, 2018

What should we call the derive?

The implemented plumbing trait is FromPest. That's not what this discussion is about.

This is about the derive naming, which is currently #[derive(FromPest)].

This is nice, because it says what it does on the tin: it derives FromPest for the type.
But especially if we add a way to derive precedence climbing, it might make sense to split the derives into multiple.

Additionally, the current #[derive(FromPest)] is both in a separate crate from the trait FromPest (pest-ast and from-pest, respectively), as well as using #[pest_ast(..)] as its "attribute namespace" for additional information on the type and fields.

If PrecClimb gets its own derive (which I think could very well be beneficial both to internal code organization of the derive crate and the derive API), then I think the main derive should be renamed away from just the generic FromPest, as it doesn't cover all derive possibilities anymore.

@CAD97 CAD97 added help wanted Extra attention is needed question Further information is requested labels Nov 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant