-
Notifications
You must be signed in to change notification settings - Fork 13.3k
RFC Add is_not_empty methods to vectors (or is_not_*
generally)
#6243
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
Comments
I'm -1 on this because somebody, somewhere, someday will make me sad with double negatives. (In all seriousness :)) |
I am largely indifferent. Leaning slightly against, because it adds neither expressivity nor convenience (it's even fewer characters for the user to type !is_empty). The Haskell libraries have a zillion convenience functions that are basically minor permutations of each other, but they all help you save characters. |
Sounds like the response to this RFC was neutral-to-negative. Closing. |
…=Manishearth Update Applicability of `redundant_allocation` lint from `MachineApplicable` to `MaybeIncorrect` This changes `redundant_allocation` lint from MachineApplicable to MaybeIncorrect ``` changelog: [`redundant_allocation]: Change Applicability from MachineApplicable to MaybeIncorrect ``` fixes rust-lang#6243 --- changelog: [`redundant_allocation`]: Change Applicability from MachineApplicable to MaybeIncorrect
We used to have this method but it was removed in favor of
!
. I still much prefer to writeis_not_foo
because it reads (and writes) so much better than the prefix bang (no backtracking to figure out what was negated), and checking for non-empty vectors is quite common. Similarly I useis_not_null
very frequently.Is this a pattern we collectively approve of or not?
The text was updated successfully, but these errors were encountered: