|
|
|
|
|
by hoppp
458 days ago
|
|
My first thought was to rewrite it without any or and operation.
just return early from if statement. If user is blacklisted return access denied;
If account is expired return access denied;
If no conditions match return access granted; Wouldn't that be more effective? |
|
The idea for the article was to make a real example of logical equivalence, as books on the subject stay pretty abstract. - like others have mentioned, in the real world there are smarter choices to be made.