Replies: 1 comment 1 reply
-
If you search around you can find previous answers to this question. Mostly that it makes it harder to compose stuff. You can only abstract over macros with more macros. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was wondering why the decision was made to not check path parameters of request handlers at compile-time. Alternatives such as Rocket use a proc macro on request handlers and can ensure the function signature catches the path parameters, eg.:
While axum involves no macros here and is unable to check this, and doesn't even check all routes when the server starts; it waits until a handler is actually invoked.
I understand avoiding macros when not necessary, but this seems like a decision that isn't really in the spirit of Rust. Is there a particular reason behind this decision?
Beta Was this translation helpful? Give feedback.
All reactions