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

Define and implement a common style for function-like macros #977

Open
killercup opened this Issue Jun 29, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@killercup
Member

killercup commented Jun 29, 2017

Diesel currently has a bunch of macros that are called like functions, e.g. joinable!, numeric_expr!, operator_allowed!, and sql_function!. In contrast to regular Rust functions, macros can consume arbitrary tokens, so guessing the correct way to call a macros is not always easy.

To make this a bit more consistent in Diesel's code base and user projects, we should settle on some general guidelines. The general idea is to be consistent and not surprise users with weird syntax.

  • (How) should we allow trailing commas in argument lists?
  • How are mappings (between types, tables, Rust and SQL, etc.) written?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment