In short: there are no significant differences in the code, and you could further reduce your code by writing it as return !(a || b || c);
If your conditions are really simple, for example if (fata_is_invalid || login_failed) , you can combine them all in one line, as you expected.
Sometimes you will see conditions that are simply massive, and in this case it is preferable to divide them into smaller pieces (either with the help of several if-statements or by reformatting your code). In any case, it's just readability - use whatever method you prefer (or whatever is protected by your "style guide").
The compiler is super-sweet and will generate (almost) identical code for everything you write in these cases.
source share