-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Better convention for ignoring function params #9239
Comments
I veto identifier names having any semantic meaning. |
Then how about this: fn foo(_(name): []const u8, _(signature): []const u8) void {} That is, once |
Currently Personally I'm not convinced having a |
#1802 (comment) (and #6062) establish that
|
When working with function pointers, it is often necessary to conform to an existing signature without needing to use the parameters.
Currently we have 2 options:
There's a few problems with this approach:
_
variable that shadows the throwaway variable. Possibly resolved by #1802Another approach is explicit ignoring:
Solution
I propose a new convention to solve both usecases of documenting the consumer behavior and indicating non-usage:
The text was updated successfully, but these errors were encountered: