Hacker News new | ask | show | jobs
by kentosi 3647 days ago
I guess the alternative would be:

    if (isValidUser() && isValidData(data)) …
Which would avoid the potentially expensive `validate()` without putting it all on the one line.
1 comments

Not really, because the code comment above mentioned that one of the primary purposes of this technique is to reduce function overhead.