-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
refactor: use isEmpty to make intention clear #2468
refactor: use isEmpty to make intention clear #2468
Conversation
I personally prefer positive |
I have fixed previous defects like this. |
If Pavel prefers it, let's keep it. Thanks @zielint0 for the proposal. |
@pvojtechovsky I fixed a lot of them in: These are the last ones to fix. Please consider reopening this pull request. |
@monperrus |
I checked #2362 #2348 #2328 #2282 and I agree that it is more readable only in this case:
because it is positive expression: "If empty then do something", but in all other cases I need more time to understand new expressions, because they often contain negative condition. E.g. and the worst case is:
Before I read it like "Type getAll contains something". Now I have to read: "It is not true that type get all is empty". My mind needs three time more effort to understand that ... |
@monperrus @pvojtechovsky |
No description provided.